Tag Info

New answers tagged

0

Thank you everyone for your insights. I solved this issue by splitting this query in two different queries. First I queried for ids, then just passed those ids to other table for info. select id from ephpb2b_products off INNER JOIN ephpb2b_members mem ON off.uid = mem.id where off.approved=1 order by off.viewed LIMIT 15; Then: select * from ...


0

It is not possible per request, but you might want to give the free MMS a try, which has quite some metrics. Together with the hardware monitoring provided by munin-node, you get a pretty good picture on what's going on on your MongoDB servers.


1

+1 to @junus for the explanations regarding EXPLAIN, the slow query log and rows examined. Regarding "How to optimize the query": Assuming there is an explicit foreign key relationship between the products and the members table, the join between them: ephpb2b_products off INNER JOIN ephpb2b_members mem ON off.uid = mem.id can be converted to ...


3

In order to answer this question, you must understand what the rows column on explain means, and the difference between calculations based on statistics and post-execution statistics. When you run explain, the rows column will tell you, for each table access, how many rows will be examined by using the intended filter. There are two ways to calculate that: ...


0

In this case, while and index could be used (not in the current state, but if the indexes changed a bit its column order) to speed up the ordering, the optimizer has to decide between favoring the filtering or the ordering. As it probably starts by filtering by the constant a.checkNo ='893881996', and accessing first the table a, it would be impossible to ...



Top 50 recent answers are included