The sorting tag has no wiki summary.
1
vote
0answers
59 views
Can't get rid of filesort on joined query sorting on second table
For some reason, this query:
EXPLAIN SELECT * FROM biz as b INNER JOIN listings as l ON b.id = l.biz_id
WHERE l.pub_id = 14 AND b.cat_id=310 ORDER BY l.level DESC, l.random DESC LIMIT 5;
says it ...
0
votes
0answers
30 views
Faster way to GROUP or ORDER dynamic fields?
We have this query in our app, that searches a table for a song title using MATCH AGAINST and picks the most relevant results.
The table has around a million results and is growing.
The app has been ...
0
votes
0answers
64 views
Prefix traverse of a tree
I have a table with tree data as it defined in this question and have to implement traversal of the tree that looks like preorder traversal but instead of root --> left subtree --> right subtree ...