[Asterisk-Users] CDR records into SQLite

Holger Schurig hs4233 at mail.mn-solutions.de
Wed Jul 7 03:02:23 MST 2004


> Do you know how many thousands?

No. This depends on your machine, the type of queries you make etc.



But hey, as this uses SQL, you can add and drop indexes at will, even 
while Asterisk has the cdr.db file open.

For example, when you need to select quite often by the destination and 
you think that is slow, then just create an index on-the-fly:

$ sqlite /var/log/asterisk/cdr.db
SQLite version 2.8.0
Enter ".help" for instructions
sqlite> create index cdr_dst on cdr (dst);
sqlite> .exit

See the documentation at http://www.sqlite.org (especially in their wiki) 
for optimizations and so on. I only have a few records in the database, 
because I don't (yet) use Asterisk in real life for the whole office.




More information about the asterisk-users mailing list