Re: [SQL] Correlating Asterisk CDRs

2011-12-07 Thread Raj Mathur (राज माथुर)
On Thursday 08 Dec 2011, Scott Marlowe wrote: > 2011/12/7 Raj Mathur (राज माथुर) : > > QUERY > > PLAN > > -- > > --

Re: [SQL] Correlating Asterisk CDRs

2011-12-07 Thread Scott Marlowe
2011/12/7 Raj Mathur (राज माथुर) : >                                                             QUERY PLAN > - >  Limit  (cost=46782.15..46782.40 rows=100 wid

Re: [SQL] Correlating Asterisk CDRs

2011-12-07 Thread Raj Mathur (राज माथुर)
On Wednesday 07 Dec 2011, Brent Dombrowski wrote: > On Dec 7, 2011, at 6:34 AM, Raj Mathur (राज माथुर) wrote: > > I'm trying to correlate Call Data Records (CDRs) from two Asterisk > > servers, one of which uses the other for telephony. The data is in > > the tables cdr and cdr2. With some indexe

Re: [SQL] Correlating Asterisk CDRs

2011-12-07 Thread Brent Dombrowski
On Dec 7, 2011, at 6:34 AM, Raj Mathur (राज माथुर) wrote: > Hi, > > I'm trying to correlate Call Data Records (CDRs) from two Asterisk > servers, one of which uses the other for telephony. The data is in > the tables cdr and cdr2. With some indexes, the query and explain > result are: > > expl

[SOLVED] Re: [SQL] Correlating Asterisk CDRs

2011-12-07 Thread Raj Mathur (राज माथुर)
On Wednesday 07 Dec 2011, Raj Mathur (राज माथुर) wrote: > On Wednesday 07 Dec 2011, Julien Cigar wrote: > > Try to raise work_mem > > Odd, I tried adding work_mem=50MB / 256MB / 1024MB into postgres.conf > and the times actually went up to over 12 seconds. Leaving it > commented results in the 4-

Re: [SQL] Correlating Asterisk CDRs

2011-12-07 Thread Julien Cigar
On 12/07/2011 16:14, Raj Mathur (राज माथुर) wrote: On Wednesday 07 Dec 2011, Julien Cigar wrote: Try to raise work_mem Odd, I tried adding work_mem=50MB / 256MB / 1024MB into postgres.conf and the times actually went up to over 12 seconds. Leaving it commented results in the 4-second time ori

Re: [SQL] Correlating Asterisk CDRs

2011-12-07 Thread Raj Mathur (राज माथुर)
On Wednesday 07 Dec 2011, Julien Cigar wrote: > Try to raise work_mem Odd, I tried adding work_mem=50MB / 256MB / 1024MB into postgres.conf and the times actually went up to over 12 seconds. Leaving it commented results in the 4-second time originally posted. Regards, -- Raj > On 12/07/2011

Re: [SQL] Correlating Asterisk CDRs

2011-12-07 Thread Julien Cigar
Try to raise work_mem On 12/07/2011 15:34, Raj Mathur (राज माथुर) wrote: Hi, I'm trying to correlate Call Data Records (CDRs) from two Asterisk servers, one of which uses the other for telephony. The data is in the tables cdr and cdr2. With some indexes, the query and explain result are: exp

[SQL] Correlating Asterisk CDRs

2011-12-07 Thread Raj Mathur (राज माथुर)
Hi, I'm trying to correlate Call Data Records (CDRs) from two Asterisk servers, one of which uses the other for telephony. The data is in the tables cdr and cdr2. With some indexes, the query and explain result are: explain analyse select cdr.calldate, cdr2.calldate, (cdr2.calldate-cdr.calldate