| 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).

