[Rt-devel] Re: slowness around 3.4.1 and custom fields?

seph seph at directionless.org
Thu Mar 24 13:53:13 EST 2005


sorry for the delay, it took me a couple days to find a test mysql.

Thank you for the index suggestions, they do seem to fix it.

> CREATE INDEX ObjectCustomFieldValues3
>    ON ObjectCustomFieldValues( ObjectId, ObjectType, Disabled );

This shall be called index 1

> CREATE INDEX ObjectCustomFieldValues4
>    ON ObjectCustomFieldValues( ObjectId, Disabled );

and this index 2

> CREATE INDEX Tickets7 ON Tickets( Type );

and this index 3


As a test case: I dropped the test db, restored from backup, applied
whichever of the indexes, than ran my slow query. I did this 5 times
for ever possible permutation of the indexes. Here are the averages
(in seconds):

none    164.28
1       0.324
2       0.322
3       164.212
1,2     0.36
1,3     0.184
2,3     0.19
1,2,3   0.184

> It creates a huge (261 byte) key because of ObjectType, which is a
> negative for IO reasons.

I don't think index maintaince really hurts me any, so I'm just going
to create all three. I assume whichever ones are proper will make it
into rt 3.4.2

thanks again

seph



More information about the Rt-devel mailing list