Bug #39486 | different select results in partitioned and unpartioned tables | ||
---|---|---|---|
Submitted: | 16 Sep 2008 17:11 | Modified: | 17 Sep 2008 7:41 |
Reporter: | Wolfgang Purrer | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S1 (Critical) |
Version: | 5.1.26 | OS: | Windows (2003 sp2) |
Assigned to: | CPU Architecture: | Any |
[16 Sep 2008 17:11]
Wolfgang Purrer
[16 Sep 2008 17:23]
Wolfgang Purrer
i changed the synopsis to transport the message clearer: The two main bugs or: * with an "or" in the statement i got more rows back as expected (some duplicates) * with an or in the statement the query slows down at a factor 8000 * with an order by... the original amount is shown, but still slow!
[16 Sep 2008 17:28]
MySQL Verification Team
Thank you for the bug report. What is the result of your test case in how to repeat section?. Thanks in advance. Your MySQL connection id is 2 Server version: 5.1.30-nt-debug-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql 5.1 >use gh Database changed mysql 5.1 >SELECT * -> FROM daten -> WHERE (zeitpunkt >= '2008-08-16 16:49:42') AND (zeitpunkt <= '2008-09-16 16:49:42') -> AND -> -> ( -> (kurz in ( 'AAA12XXXXXXX','AAA160XXXXXX') -> )); +--------------+---------------------+----------+ | kurz | zeitpunkt | wert | +--------------+---------------------+----------+ | AAA12XXXXXXX | 2008-08-16 17:30:00 | 75.60000 | | AAA12XXXXXXX | 2008-08-16 21:30:00 | 75.30000 | | AAA160XXXXXX | 2008-08-16 17:30:00 | 85.90000 | | AAA160XXXXXX | 2008-08-16 19:30:00 | 85.40000 | +--------------+---------------------+----------+ 4 rows in set (0.00 sec) mysql 5.1 > mysql 5.1 >SELECT * -> FROM daten -> WHERE (zeitpunkt >= '2008-08-16 16:49:42') AND (zeitpunkt <= '2008-09-16 16:49:42') -> AND -> -> ( -> (kurz in ( 'AAA12XXXXXXX','AAA160XXXXXX') -> )) order by kurz; +--------------+---------------------+----------+ | kurz | zeitpunkt | wert | +--------------+---------------------+----------+ | AAA12XXXXXXX | 2008-08-16 17:30:00 | 75.60000 | | AAA12XXXXXXX | 2008-08-16 21:30:00 | 75.30000 | | AAA160XXXXXX | 2008-08-16 17:30:00 | 85.90000 | | AAA160XXXXXX | 2008-08-16 19:30:00 | 85.40000 | +--------------+---------------------+----------+ 4 rows in set (0.01 sec) mysql 5.1 >
[16 Sep 2008 17:32]
Wolfgang Purrer
SELECT * FROM daten WHERE (zeitpunkt >= '2008-08-16 16:49:42') AND (zeitpunkt <= '2008-09-16 16:49:42') AND ( (kurz in ( 'AAA12XXXXXXX','AAA160XXXXXX') )) 'AAA12XXXXXXX', '2008-08-16 17:30:00', 75.60000 'AAA12XXXXXXX', '2008-08-16 21:30:00', 75.30000 'AAA160XXXXXX', '2008-08-16 17:30:00', 85.90000 'AAA160XXXXXX', '2008-08-16 19:30:00', 85.40000 'AAA160XXXXXX', '2008-08-16 17:30:00', 85.90000 'AAA160XXXXXX', '2008-08-16 19:30:00', 85.40000 SELECT * FROM daten WHERE (zeitpunkt >= '2008-08-16 16:49:42') AND (zeitpunkt <= '2008-09-16 16:49:42') AND ( (kurz in ( 'AAA12XXXXXXX','AAA160XXXXXX') )) order by kurz; 'AAA12XXXXXXX', '2008-08-16 17:30:00', 75.60000 'AAA12XXXXXXX', '2008-08-16 21:30:00', 75.30000 'AAA160XXXXXX', '2008-08-16 17:30:00', 85.90000 'AAA160XXXXXX', '2008-08-16 19:30:00', 85.40000
[16 Sep 2008 17:47]
Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.1.28. In case of the same problem, please, send SHOW CREATE TABLE results for the table(s) involved, as well as EXPLAIN and EXPLAIN PARTITIONS results for the problematic SELECT(s).
[17 Sep 2008 7:41]
Wolfgang Purrer
both problems are solved in 5.1.28 ...