Author Topic: database maintenance  (Read 5141 times)

mwood

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
    • View Profile
    • Email
database maintenance
« on: January 03, 2011, 20:25:17 »
Are there any tools included with queuemetrics to allow archiving of records? Our database is getting pretty big and we really need to offload old data in order to maintain enough room on the system for current data.

Thanks

marcos

  • Loway
  • Full Member
  • *
  • Posts: 138
  • Karma: 3
    • View Profile
Re: database maintenance
« Reply #1 on: January 10, 2011, 12:40:35 »
Hi,

No. We don't provide any external tool able to archive old database logs.
What I can suggest is to move and/or drop the queue_log and qa_data tables through any sort of MySQL administration tool.
The qa_data contains information related to QA activities so it could be empty if you don't use this feature.

Thank you and regards,
Marco.

mwood

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
    • View Profile
    • Email
Re: database maintenance
« Reply #2 on: January 10, 2011, 18:58:42 »
Can you recommend an adequate utility please. Also this would be good feature to add. Some sort of record archiving is standard in most ACD reporting packages.

Thanks
M Wood

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: database maintenance
« Reply #3 on: January 11, 2011, 14:37:10 »
Usually there is no need to do it, as the table is actually "cluster-indexed" - so even if it is very very large, its access performance does not change much.


mwood

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
    • View Profile
    • Email
Re: database maintenance
« Reply #4 on: January 11, 2011, 23:19:17 »
We have hard drive constraints driving this need, so we need to trim the database.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: database maintenance
« Reply #5 on: January 13, 2011, 11:07:16 »
OK in this case decide a timestamp and delete from the queue_log table all records that are below a certain point. Or better, make a complete table dump first (maybe from a  different server) and then do the deletion.


There are a number of online services that translate a date to a timestamp and vice-versa.


 

mwood

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
    • View Profile
    • Email
Re: database maintenance
« Reply #6 on: January 16, 2011, 23:22:30 »
so is this correct?

DELETE FROM queue_log WHERE time_id < "timestamp of oldest desired record"

and then rebuild the indexes

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: database maintenance
« Reply #7 on: January 18, 2011, 16:03:46 »
Yes.
Make a backup first! :)