Add an index on provider, id columns for improved performance.

Comments

pdrake’s picture

StatusFileSize
new711 bytes

Add index on provider, id columns for improved performance. For a PURL table with ~15,000 entries, this decreases query time from 13ms to 0.5ms for queries like the following (which occur in purl_load). A busy site may execute millions of such queries each day.
SELECT * FROM {purl} WHERE provider = ? AND id = ?

bblake’s picture

Status: Active » Fixed

Looks like this patch has already been applied to the 6.x-1.x branch. Thanks for your help.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dbehrman’s picture

Issue summary: View changes
StatusFileSize
new712 bytes

Modifying this patch to just create an index with the id column. In most cases the provider column would have an extremely low cardinality and this index would be more performant when the provider is not provided.