Dusty Hall wrote:

DB queries and
inserts are taking a very long time to complete.  Speeding these up
would be my goal.  Here's a snippet from my slow_queries log....

# Time: 030328 10:28:20
# [EMAIL PROTECTED]: acid_user[acid_user] @ localhost []
# Query_time: 17 Lock_time: 0 Rows_sent: 0 Rows_examined: 1353805 SELECT acid_event.sid, acid_event.cid, signature, timestamp,
acid_event.ip_src, acid_event.ip_dst, acid_event.ip_proto FROM
acid_event WHERE ( UNIX_TIMESTAMP(timestamp) >= UNIX_TIMESTAMP('2003-03-25 000000') AND UNIX_TIMESTAMP(time
stamp) <= UNIX_TIMESTAMP('2003-03-25 150000') ) LIMIT 0, 50;


It looks to me as though your use of the UNIX_TIMESTAMP function is
preventing any indexes that you might have from being used.  I suggest
that you phrase your queries without them, and index on timestamp if you
haven't already.

Bruce Feist





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to