Counting over an indexed association should be quite fast anyway. Are you sure there is an actual gain for introducing that much complexity?
Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Fri, Jul 18, 2014 at 5:08 PM, Nelson Teixeira <[email protected]> wrote: > Hello, based on this Stackoverflow question/answer: > > > http://stackoverflow.com/questions/24825047/doctrine-custom-form-field-based-on-query > > I would like to bring an ideia to the development team in using > > select exists(select * from associated_table where id_main_table = > <whatever> limit 1) > > in isEmpty() for EXTRA_LAZY associations. > > The current functionality is it would fetch the whole collection when > called. > > Based on my tests the performace gain on using it over count() > 0 would > be 20x faster. > > -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" 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/doctrine-user. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" 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/doctrine-user. For more options, visit https://groups.google.com/d/optout.
