Bug #2615 Performance problem when joining NULLs
| Submitted: | 2 Feb 2004 11:03 | Modified: | 18 Apr 2007 22:49 |
|---|---|---|---|
| Reporter: | Nathan Goodman | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server: MyISAM storage engine | Severity: | S2 (Serious) |
| Version: | 4.1 | OS: | Linux (Red Hat 9.0) |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[2 Feb 2004 11:03]
Nathan Goodman
[4 Feb 2004 17:50]
Michael Widenius
This is a good optimizing idea but not trivial to implement. I did look into adding this to 4.0, but concluded that the risk was too big for accidently crashing something else. What makes this a bit complex to implement is that the key-copy code doesn't know if we are using = or <=> as a index comparison. To fix this we have to change some structures and function calls to store what comparison is used and also add 'fast' detection if a null was used in the index. We will look into adding this to 4.1 in the near future. Regards, Monty
[18 Apr 2007 22:48]
Sergey Petrunya
This problem has been addressed in fix for BUG#8877. Now we have short-cutting done as soon as possible: SELECT AB.a, AB.b AS b0, BC.b AS b1, BC.c FROM AB, BC WHERE AB.b=BC.b; show status like 'Handler_%'; +----------------------------+-------+ | Variable_name | Value | +----------------------------+-------+ | Handler_commit | 0 | | Handler_delete | 0 | | Handler_discover | 0 | | Handler_prepare | 0 | | Handler_read_first | 0 | | Handler_read_key | 1 | | Handler_read_next | 2 | | Handler_read_prev | 0 | | Handler_read_rnd | 0 | | Handler_read_rnd_next | 1002 | | Handler_rollback | 0 | | Handler_savepoint | 0 | | Handler_savepoint_rollback | 0 | | Handler_update | 0 | | Handler_write | 14 | +----------------------------+-------+ 15 rows in set (0.01 sec) The documentation is here: http://dev.mysql.com/doc/internals/en/optimizer-nulls-filtering.html (You might want a little more till BUG#27939 is fixed and NULLs filtering works for eq_ref too).
[18 Apr 2007 22:49]
Sergey Petrunya
Marking as duplicate of BUG#8877
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
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.