Tag Info

New answers tagged

0

According to the last comment at the bug report (http://bugs.mysql.com/bug.php?id=76988), it's a bug present in 5.6.24 (current release at the time of writting), and it has been fixed in current source code. Thank you for the bug report. I was able to repeat with 5.6.24 version but not more with current source probably fixed for bug ...


0

You should run the query in this way. It will work correctly. SELECT a.* , if(u.status = 1 AND a.acre_aprobado = 0, 5, u.status) tipo FROM acreditado a JOIN users u ON (`a`.`acre_id` = `u`.`id`) WHERE `acre_test` = 0 GROUP BY `a`.`acre_id`,tipo HAVING tipo = '1' ORDER BY `a`.`acre_id`,`acre_aprobado` ASC This is depend on mysql server ...


2

The HAVING tipo = '1' should in no way allow output to include tipo=0, regardless of GROUP BY issues, etc. File a bug report at http://bugs.mysql.com .


1

I recently answered a post Does "deprecated" in MySQL means "not guaranteed" or "still guaranteed"? where I mentioned how ORDER BY NULL can have spurious behavior between Storage Engines and Major/Minor Versions (in your case). Your question shows that you are doing what the end of my post says Therefore, you should always ...


0

Don't have dozens of TEXT fields in a table. Don't have "arrays" in a table. By that I mean don't have columns Dev_1_Details .. Dev_22_Details. Instead have another table with Message_ID bigint(20) NOT NULL (for JOINing) and Dev_Details TEXT NOT NULL and (optionally) a TINYINT UNSIGNED to number them. Avoid FORCE INDEX -- Today it might help with some ...


0

First the ORDER BY uses index on first table columns. But EXPLAIN shows your first table is t not pd. So use STRAIGHT JOIN. Second EXPLAIN shows INDEX TYPE IS RANGE. So it doesn't uses other indexes for ORDER BY. It uses index on between condition and if it is multi column index then order matters, and if condition is on first column (on multi column index) ...


2

Seems to me you are forcing too many indexes instead of letting optimizer do its work and maybe just push it a little bit in the right direction. One of those forced indexes or something else made it use t as base table instead of pd - that means order by pd.receipt_time_stamp has to be resolved by filesort on temp table (and text column in temp table means ...



Top 50 recent answers are included