Tagged Questions
1
vote
1answer
112 views
Index strategy for a Queue Table, getting rid of filesort
I am trying to get rid of a filesort operation (and preferably also optimize a bottleneck query). We are using an innodb mysql table as a queue to process various incoming business activities. It is ...
1
vote
1answer
211 views
ORDER BY on aggregate field on a closure table giving unexpected results
I am updating my companies product database and I'm looking into different ways to do design our faceted navigation "selector" tables. The idea of faceted navigation might look like this:
It's ...
0
votes
1answer
388 views
How can I tell if an index is being used to sort in MySQL?
I have a query with an ORDER BY clause which uses a column which is the last column on an index which is being used in the WHERE clause, essentially of the form:
SELECT
cols
FROM
tables
WHERE
...
2
votes
1answer
95 views
Are two indexes needed?
Our MySQL database will contain an encyclopedia. The encyclopedia will be shown in pages where every page contains entries starting from a letter.
Which indexes should I use? Should I have two ...
1
vote
1answer
168 views
Is it possible to add index to mysql with multiple column to optimize order by performance?
# I have a simple table
create table t1 (c1 int, c2 int);
# I want to do the following sorting
select * from t1 order by c2 desc, c1 desc;
select * from t1 order by c2 asc, c1 desc;
# add ...