tloginbr-asterisk at y... Guest
|
Posted: Wed Jan 23, 2008 7:16 am Post subject: [asterisk-users] Rotating CDR records inside mysql - anyone |
|
|
Thanks. I have about 1 million records, but my machine is not so
good. Its a core2 duo with 2 Gig of RAM. When I do only select it
takes a few seconds, but some of my reports require joins, and thats
a big problem.
Thiago
Quote: | Well, i wouldn't recommend delete, as that would keep mysql very
unhappy. you could do RENAME TABLE and CREATE TABLE, or mysqldump
and
TRUNCATE TABLE, but they have to happen almost instantly (without
asterisk trying to do INSERT). I have nearly none experience with
transactions, but probably those would be helpful.
Btw, you can block access to mysql by firewall (to move existing
data)
or stop mysql (to physycally copy binary database files) and then
take
it back up - asterisk will post it's CDRs later when db comes
accessible.
Btw - how many records do you have that it gets slow? On what
machine?
I currently have 3 million CDR records in MySQL with well created
indexes - and most reports are dynamic. Usually from 0 to 2
seconds,
but sometimes up to minute for joins :p. Well, that's 2x Quad core
xeons of 3GHz and 8Gb RAM (2 of which are used by MySQL indexes).
Asterisk is running on same machine.
Regards,
Atis
--
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835
|
Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento!
http://br.mail.yahoo.com/ |
|