Bug #2257 AWFUL delete performance for HEAP table with WHERE clause
| Submitted: | 2 Jan 2004 7:44 | Modified: | 2 Jan 2004 12:04 |
|---|---|---|---|
| Reporter: | Igor Mendelev | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S1 (Critical) |
| Version: | 4.1.2-nt-alpha | OS: | Windows (WinXP) |
| Assigned to: | Dean Ellis | CPU Architecture: | Any |
[2 Jan 2004 7:44]
Igor Mendelev
[2 Jan 2004 9:04]
Dean Ellis
cannot repeat this: mysql> select count(*) from ack; +----------+ | count(*) | +----------+ | 2097152 | +----------+ 1 row in set (0.00 sec) mysql> delete from ack where timeTo < timeFrom; Query OK, 1048528 rows affected (6.42 sec) Unless, of course, I do not actually use HEAP.
[2 Jan 2004 11:56]
Dean Ellis
Per discussion elsewhere regarding this bug, it appears to be not so much a bug as simply the nature of HASH indexes with a large number of collisions (hashing 257 unique values for 1.6 million rows). DELETE is fast when all indexes are BTREE type, or when the hashed columns contain a large number of unique values (with thus fewer collisions).
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 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.