Letractively / fuuka

Automatically exported from code.google.com/p/fuuka
Other
0 stars 0 forks source link

Tripcode search is slow #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Searching for tripcodes is slow as fuck.

1. Search for !mOWjKAWAII on /a/
2. Get stuck for about 130 seconds on "Sending data | select * from a where
trip='!mOWjKAWAII' and  1 order by timestamp desc limit 24 offset 0"

select * from a where trip='!mOWjKAWAII' insta-returns.
select * from a where trip='!mOWjKAWAII' order by timestamp asc insta-returns.
select * from a where trip='!mOWjKAWAII' order by timestamp desc is slow as
fuck.

Order by num rather than timestamp will make things a lot better (5 secs vs
130 secs), but it's still a bit too high.

Temporary fix would be to make it order by num (primary key) rather than
timestamp. A more permanent key would be to understand why is the timestamp
index performing so badly.

Strangely enough, the name field performs just fine?

Original issue reported on code.google.com by eksopl on 2 Mar 2009 at 9:21

GoogleCodeExporter commented 8 years ago
Even when ordering by num desc, it still takes like 30 seconds on "Sending 
data".
Dunno how I got 5 secs, must have typed in the wrong query.

Original comment by eksopl on 2 Mar 2009 at 9:35

GoogleCodeExporter commented 8 years ago

Original comment by andrey.o...@gmail.com on 6 Mar 2009 at 12:30