Thursday, March 17, 2016

CakePHP 3 + MSSQL = slow query


hello everyone, this is my situation.

MSSQL server with query on a single table; timer says 4.47s, SQL Log says 1375 rows in 110ms.
Time spent in "controller action" is 3600ms and I further tried to inspect the controller code, printing elapsed microseconds: it seems like the assignment of the foreach cycle is the slowest thing in my code.

Maybe I can optimize something to save some time?

even with debug off time is not much better.

please tell me how can I provide more debug information to help fix this.

thanks!

Enrico

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

CakePHP Newsletter - Community Update

In case you have missed the news..!
View this email in your browser

In case you have missed it...

As you know we have been up to a lot and we are excited for the new developments still to come...

What do we mean, you ask?

Well besides our annual conference, CakeFest 2016 coming up shortly, we are busy brainstorming a few other neat concepts that will be put out to everyone to keep our community networking, engaged and on top-of-your CakePHP game.

One of the announcements involves gathering all of our freelance developers, so if you are currently freelancing and developing in CakePHP, do sign up 
for our freelancer newsletter so you don't miss out on the news!

Another big announcement will be released at CakeFest 2016 - will you be there?!

If you haven't already seen, we have opened up the voting for CakeFest talks up to you, our community. Why? Because CakeFest is here for you, and we want to know what you want to come learn more about!
But hurry - voting is closing in the next few days!

Did I mention that for a limited time, the ticket price is at early bird rates? - This won't last long!

Until next time!

                                                                                                                      Larry E. Masters
                                                                                                                      Co-Founder CakePHP

                                                                                                                                    

Coming up next...
Freelancers watch this space #freelancing 
 
Freelancing in CakePHP?
Join our newsletter and don't miss out!! 
Are you currently freelancing and wanting to find a place to network for CakePHP jobs? We will be sending some exciting news soon and we want you to be a part of it!
 
The CakePHP core team is happy to announce the immediate availability of CakePHP 2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, and 3.2.5. These releases contain security fixes. 3.2.5 and 2.8.2 also contain bugfixes.

Want to be more involved in the community? 

Here's how ...
User Support 
Education and Training
Marketing and Evangelism
Contributing Code
Testing and Quality Assurance
Documentation
Translations
Find out more or mail us to get involved today!
 
Copyright ©  2016 Cake Software Foundation, Inc.,  All rights reserved.


Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list

 

Wednesday, March 16, 2016

Re: Storing encrypted value using getter/setter not working. Stored in plain text.

Eventually i changed it to a varbinary(65000) column and it started to work. In Cakephp 2 it worked with a varchar column. now it needs to be binary in 3 and have enough space.

On Wednesday, March 16, 2016 at 10:19:38 AM UTC+1, heavyKevy wrote:
I hate to state the obvious, but did you verify that the field size was large enough to store the encrypted value?
I had a similar issue with hashing a password, the field wasn't large enough and the value was saved but cut off so that the password never matched.
Maybe try it with the max varchar size and see if it will work.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Storing encrypted value using getter/setter not working. Stored in plain text.

I hate to state the obvious, but did you verify that the field size was large enough to store the encrypted value?
I had a similar issue with hashing a password, the field wasn't large enough and the value was saved but cut off so that the password never matched.
Maybe try it with the max varchar size and see if it will work.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, March 15, 2016

Re: Storing encrypted value using getter/setter not working. Stored in plain text.

I have already tried to change it to text. This had the same effect. I also cleared the caches/orm cAche when intested this. 



Op 16 mrt. 2016 om 00:12 heeft Christian Quispe <christian.quispeh@gmail.com> het volgende geschreven:

Cambia tu field de tu base de datos a text, es posible que tu cadena codificada no se guarde completamente.



Enviado con MailTrack

Saludos

Christian Quispe

Geek and Developer
Miembro:  GDG Lima (Google Developer Group Lima)

Portafolio: www.oxicode.io

¿A quién le enseñan sus aciertos?, si yo aprendo de mis errores constantemente...


2016-03-15 13:46 GMT-05:00 Willem <wschwarte@gmail.com>:
saving to the database cuts off the encrypted data. varchar(255) and text fields both have this issue.. 
is this a bug in CakePHP

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Storing encrypted value using getter/setter not working. Stored in plain text.

Cambia tu field de tu base de datos a text, es posible que tu cadena codificada no se guarde completamente.



Enviado con MailTrack

Saludos

Christian Quispe

Geek and Developer
Miembro:  GDG Lima (Google Developer Group Lima)

Portafolio: www.oxicode.io

¿A quién le enseñan sus aciertos?, si yo aprendo de mis errores constantemente...


2016-03-15 13:46 GMT-05:00 Willem <wschwarte@gmail.com>:
saving to the database cuts off the encrypted data. varchar(255) and text fields both have this issue.. 
is this a bug in CakePHP

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Storing encrypted value using getter/setter not working. Stored in plain text.

saving to the database cuts off the encrypted data. varchar(255) and text fields both have this issue.. 
is this a bug in CakePHP

--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.