PDA

View Full Version : Too muchsyslog entries for admin-panel


msdirect
12-01-2011, 05:31 AM
Hi,

We are experiencing a problem on a heavily used osticket-system. It seems that the query "SELECT log.* FROM ost_syslog log WHERE 1 ORDER BY log.created DESC LIMIT 0,30" takes way too long for the browser to wait for.

This particular record has 12million records in this table. Of course we could use this system on a machine with more available RAM, faster disk io, better processor, but i think a quicker, cheaper solution would be to either:
- use an index on 'ost_syslog.created' or
- expand the query with AND`date`>'$startdate' (startdate is a little time ago, like 1 month or so.

What do you specialists think ?

I also have another issue, i will open a new thread for this.

Marcus

scottro
12-01-2011, 10:14 AM
Holy Buckets!

I think if I had just a log database that had that many entries I would just set it up to delete anything older than X days, or at least have it export it and then delete it. Wowza.