MySQL Forums
Forum List  »  Optimizer & Parser

Re: Why Query Cache Actived Returns Wrong Results?
Posted by: Daniel Estrada
Date: September 23, 2012 08:24PM

Thank you for your attention...
This is the query:

SELECT SUBSTRING(clave,1,2) AS result1,
SUM(vol) AS total_vol,
SUM(result) AS total_result,
FROM mainTable
WHERE date fecha1<='201205'
AND clave LIKE 'V%'
GROUP BY SUBSTRING(clave,1,2);

The results sometimes have some rows with value 0, but If I execute this query:

SELECT SUBSTRING(clave,1,2) AS result1,
SUM(vol) AS total_vol,
SUM(result) AS total_result,
FROM mainTable
WHERE date fecha1<='201205'
AND substring(clave, 1, 2)='VA';

This query returns the specific result with value 0, the result is correct, All the rows have values... If I execute this query with cache disabled, all the results are right, but I really need to use cache... Maybe my configuration is wrong...

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Why Query Cache Actived Returns Wrong Results?
1695
September 23, 2012 08:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.