Skip site navigation (1) Skip section navigation (2)

Re: consulta se demora mucho mas que antes

From: Miguel <mmiranda(at)123(dot)com(dot)sv>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: "Javier Aquino H(dot)" <JAquino(at)lexuseditores(dot)com>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: consulta se demora mucho mas que antes
Date: 2006-03-31 16:54:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-es-ayuda
Jaime Casanova wrote:

>> por que sera que nadie me para bola?
>>hace algunos mails atras te aconseje que cambies de:
>>radius-# and h323disconnecttime::date = '2006-03-29'
>>radius-# and h323disconnecttime::date = '2006-03-29'::date
Bueno, yo si segui tu consejo,  pero con mismos resultados

radius=# explain
radius-# select 'quemados',sum(acctsessiontime)/60 as minutos, 
sum(roundedsessiontime)/60 as redondeados
radius-# from stopacct a inner join pines b on (a.username =
where h323callorigin = 'originate'
and h323disconnecttime::date = '2006-03-29'::date
radius-# where h323callorigin = 'originate'
radius-# and h323disconnecttime::date = '2006-03-29'::date
radius-# and idproducto in  (11,40,41);
                                                         QUERY PLAN
 Aggregate  (cost=393646.90..393646.91 rows=1 width=16)
   ->  Nested Loop  (cost=0.00..393639.84 rows=1411 width=16)
         ->  Seq Scan on stopacct a  (cost=0.00..382461.38 rows=1853 
               Filter: (((h323callorigin)::text = 'originate'::text) AND 
((h323disconnecttime)::date = '2006-03-29'::date))
         ->  Index Scan using pines_pkey on pines b  (cost=0.00..6.02 
rows=1 width=13)
               Index Cond: (("outer".username)::text = (
               Filter: ((idproducto = 11) OR (idproducto = 40) OR 
(idproducto = 41))
(7 rows)


>pensandolo bien, para eso el indice deberia estar definido sobre
>o me equivoco?

Nope, igual ignora el indice.


In response to


pgsql-es-ayuda by date

Next:From: Alvaro HerreraDate: 2006-03-31 17:05:08
Subject: Re: consulta se demora mucho mas que antes
Previous:From: Alvaro HerreraDate: 2006-03-31 16:28:01
Subject: Re: memoria usada por postmaster

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group