Opened 5 years ago

Closed 5 years ago

#1485125 closed Bugs (fixed)

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 (2)

comment:1 Changed 5 years ago by alec

  • Milestone changed from later to 0.2-beta

comment:2 Changed 5 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [c98f3b5d].

Note: See TracTickets for help on using tickets.