[Asterisk-Users] CDR Output

asterisk at billheckel.com asterisk at billheckel.com
Wed Mar 5 07:41:37 MST 2003


I am always wary of allowing ad-hoc queries that may lock tables on a production system.  One 
relatively easy way to avoid this issue is to use hotcopy to make a read-only reporting database 
that gets updated every x minutes.  The other is to use replication if you need an up to the second 
copy.

Bill

Chris Albertson wrote:
> I tested both MySQL and PostgreSQL under various loads, Actually
> got paid to do it.  In the simple case where one process just
> stuffs data into the database with INSERT MySQL was about 4x
> faster in terms of INSERT/second
> 
> However if you have five or six processes that are doing lots
> of transactions, mixed INSERT and SELECT, MySQL grinds to a halt
> The trouble is locking.  MySQL only lets one process at a table at a
> time so everyone else is shut out waiting.
> 
> On a large PBX with high call volume you can't afford to have
> a table locked for 10 or 30 seconds while some guy does an ad-hoc
> join.
> 
> PostgreSQL is more stable but can "only" do a few hundred INSERT
> per second on PC hardware vs. well over 1000/sec for MySQL.
> 
> 
> --- Matteo Brancaleoni <mbrancaleoni at espia.it> wrote:
> 
>>I agree. postgres could be too slow if used into a big
>>system and you can't afford a rather good machine.
>>
>>mysql is very fast and simple.
>>
>>and I don't see where's the problem into the extraction...
>>a simple division could be done in any language, with any
>>program... 
>>
>>matteo.
>>
>>Il mar, 2003-03-04 alle 20:27, asterisk at billheckel.com ha scritto:
>>
>>>Why would anyone use such a big axe for a small problem, a trigger
>>
>>to do simple math. Bah.
>>
>>>MySql is perfectly suitable for CDR logging on any practical phone
>>
>>system short of telco main office 
>>
>>>eqpt.
>>>
>>>
>>>Karl Putland wrote:
>>>
>>>>On Tue, 2003-03-04 at 11:57, Matthew S. Hill wrote:
>>>>
>>>>
>>>>>I am pushing all the cdr info to a MySQL database on a separate
>>
>>machine. 
>>
>>>>>I have noticed that the duration times for all calls are recorded
>>
>>in 
>>
>>>>>seconds, by Asterisk. Is there a way to set the recorded call
>>
>>duration 
>>
>>>>>to a decimal representation of minutes? ie 90 sec = 1.5 min. My 
>>>>>extraction process would be a little simpler if the data dumped
>>
>>into the 
>>
>>>>>database were minutes and not seconds.
>>>>>
>>>>
>>>>
>>>>Write a trigger for on insert or a view that converts sec->min. 
>>
>>Oh wait
>>
>>>>your using MySQL.  Use PostgreSQL ;)
>>>>
>>>>
>>>
>>>_______________________________________________
>>>Asterisk-Users mailing list
>>>Asterisk-Users at lists.digium.com
>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>-- 
>>Matteo Brancaleoni <mbrancaleoni at espia.it>
>>Espia - Emmegi Srl
>>
>>_______________________________________________
>>Asterisk-Users mailing list
>>Asterisk-Users at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 
> 
> =====
> Chris Albertson
>   Home:   310-376-1029  chrisalbertson90278 at yahoo.com
>   Cell:   310-990-7550
>   Office: 310-336-5189  Christopher.J.Albertson at aero.org
>   KG6OMK
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 




More information about the asterisk-users mailing list