Skip Navigation

Text Only/ Printer-Friendly

Remove

generic3 query optimization / conditional straight joins

May 12, 2010 at 6:16 pm
By nwhite

Generic3 can have terrible performance when multiple relationship filters are applied to a page. I have committed two changes today which should help the situation.

1. generic3 will automatically cause mysql to use a straight join when there are 3 or more filters applied on any module that uses generic3's built in filtering. This threshold is configurable in the page type with the parameter "straight_join_filter_threshold" which can be set to any integer. The same parameter can be set to false or NULL (any non integer really) to disabled the straight join optimization entirely.

2. the default filter displayer used by generic3 will no longer show the "add focus" option when the current filtered set has 0 items.

It is not clear if the performance problems are limited to a certain version of the MySQL optimizer or not, but this fix should help the situation. A better fix would involve a wholesale revamp of the entity selector which is not slated for the near term.

Add a comment

Name:*
Comment:*
The following fields are not to be filled out. Skip to Submit Button.
Not Comment:
(This is here to trap robots. Don't put any text here.)
Not URL:
(This is here to trap robots. Don't put any text here.)
Avoid:
(This is here to trap robots. Don't put any text here.)