title sort extremely slow in certain cases in 2.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Mike Rylander |
Bug Description
We recently discovered that sorting by title was extremely slow under some circumstances on our 2.0 system. While more testing would be needed to determine what those circumstances are, at least one actual search query (run directly in psql) took over three minutes to complete (I stopped timing after 3 minutes, but it did eventually complete).
While it is probably possible to convince Postgresql to use a better query plan of some sort, I decided the simpler route would be to attack the slow point (the 'tnf' selection from mfr) directly with a new targeted index. Doing the following:
CREATE INDEX metabib_
reduced the query time to mere seconds with very minimal bloat.
While it looks like 2.1+ might handle 'tnf' differently, I believe adding something along these lines to at least 2.0.x is a pretty simple cure to a serious problem.
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Hi Dan - can you please include the actual search query that you used in the bug report?