Worros 51ce6fc191 Index mods '+0' from sqlcoder on mailing list
Have been tested and provide a significant improvement on import.

"""
Along with new indexes, I think some of the sql in fpdb_simple can be
altered to make it use existing indexes more effectively. Generally
these mods affect statements where the db has a choice of 2 indexes to
use and I think it is choosing badly, e.g. it is using tourneyTypeId
which could match the whole table when it could use the new
siteTourneyNo index which will return very few rows.

To stop the db from using an index I'm just adding zero to the field, so
something like
   playerId = %s
changes to
   playerId+0 = %s
We humans can tell this is no real change at all, but the db sees this
as a change from <field> = <value> to <expression> = <value>, and it can
only use the index if the <field> the index is on is being tested.
(Nowadays you can index expressions in some databases but we'll ignore
that!)
"""
2008-12-05 17:18:13 +09:00
2008-11-10 03:22:21 -05:00
2008-11-10 03:22:21 -05:00
2008-11-07 18:35:30 +13:00
S
Description
No description provided
14 MiB
Languages
Python 57.3%
Gettext Catalog 30.3%
Modelica 11.4%
AutoIt 0.4%
Shell 0.3%
Other 0.2%