Indeed my friend! I didn't have a FK on B, after creating one I had the desired result ... 1,7s average.
Thank you! luni, 4 noiembrie 2013, 10:23:07 UTC+2, Ashish Mahana a scris: > > > HI Aurelian, > There is not any problem when you use containable, its good to use that > feature. > > Coming to the problem part, > 1. First thing what i guess is that you have not set the index properly > for tables that are related so that you are also delaying the result in the > second association ($hasMany) > 2. Second thing is that if u have *A $hasOne B* association then cake > expects one-one relationship with respect to the primaryKey and foreignKey > as it find violation of > referential integrity it causes slow record fetching. > > if you have any doubt you are welcome to ask. > > > On Friday, November 1, 2013 9:42:55 PM UTC+5:30, Aurelian Apostol wrote: >> >> I am using two tables items and products, item hasOne product. >> When making a containable pagination on Item it loads 1200 rows in 13s, >> when moving Product in hasMany it loads in 3,2s. With no other changes on >> the models or any other place as that matters. >> >> Any ideas? >> > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
