gwu-libraries/launchpad — pull request #613 by edsu (2014-04-23 10:03:10+00:00)
Title: forced django not to convert our strings to unicode when binding paramet...

I confirmed that Django was promoting bound string parameters to unicode before passing them off to cx_Oracle. This caused our query of bib_index.normal_heading to not use the index that is available, and resulted in a full table scan, making our queries run pretty slow (> 2 seconds). The fix on line 34 of ui.db below forces Django not to do that.

In addition to testing the response times with ui.dbtest I added some temporary print statements with times around the lookups and could see them taking about 2 seconds when running under the devserver.

All of our other queries with bind variables involve Number columns, which Oracle is smarter about optimizing. The one exception to this is `ui.voyager.get_related_bibids`.

fixes #611