Inboxen / website

obsolete - use https://github.com/Inboxen/Inboxen
GNU Affero General Public License v3.0
1 stars 28 forks source link

Certain search terms take longer than others #153

Closed moggers87 closed 10 years ago

moggers87 commented 10 years ago

For example, "gnu" takes 0.8 seconds yet "mail" takes 50 seconds.

Both return 1 inbox and the maximum number of emails (10). It might be that either query slicing isn't working (bug upstream) or the SQL that's being generated is really really slow when applying LIMIT

Further investigation required.

moggers87 commented 10 years ago
In [4]: watson.search("gnu").count()
Out[4]: 1680

In [5]: watson.search("mail").count()
Out[5]: 111338
moggers87 commented 10 years ago

I don't know why I didn't think of this before :)

moggers87 commented 10 years ago

Looking at the queries that Watson is doing, the only possible speed up would be to replace the subquery with a join. Not sure if that will help.

For your viewing: http://pamrel.lu/d7dae/

moggers87 commented 10 years ago

Query plan: http://pamrel.lu/329b1/

Query analysis: http://pamrel.lu/a2b71/

moggers87 commented 10 years ago

I'm closing this as #170 is now under way!