Ticket #1485125 (closed Bugs: fixed)

Opened 6 months ago

Last modified 6 months ago

messages.created needs index

Reported by: matthew.kent Owned by:
Priority: 5 Milestone: 0.2-beta
Component: Database Version: 0.1.1
Severity: normal Keywords:
Cc:

Description

Was watching the following stack up quite a bit this morning

# Query_time: 11  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
DELETE FROM messages
             WHERE  created < FROM_UNIXTIME(1212424204);

# Query_time: 11  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
DELETE FROM messages
             WHERE  created < FROM_UNIXTIME(1212424205)

this on a dedicated db using mysql 5.0.54 enterprise.

table is holding some 155000 rows right now which makes the delete without an index on the where clause pretty rough.

Solution is to add an index to messages.created and they go so quick I can't see them in the process list anymore :)

Change History

Changed 6 months ago by alec

  • milestone changed from later to 0.2-beta

Changed 6 months ago by alec

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1522.

Note: See TracTickets for help on using tickets.