RES: RES: select on 1milion register = 6s

From: Bruno Rodrigues Siqueira
Subject: RES: RES: select on 1milion register = 6s
Date: ,
Msg-id: 002a01c7d168$16b4a550$e900a8c0@brunolaptop
(view: Whole thread, Raw)
In response to: Re: RES: select on 1milion register = 6s  (Ragnar)
List: pgsql-performance

Tree view

select on 1milion register = 6s  ("Bruno Rodrigues Siqueira", )
 Re: select on 1milion register = 6s  (Craig James, )
  RES: select on 1milion register = 6s  ("Bruno Rodrigues Siqueira", )
   Re: RES: select on 1milion register = 6s  (Ragnar, )
    RES: RES: select on 1milion register = 6s  ("Bruno Rodrigues Siqueira", )
    Re: RES: select on 1milion register = 6s  (Decibel!, )
     RES: RES: select on 1milion register = 6s  ("Bruno Rodrigues Siqueira", )
      Re: RES: RES: select on 1milion register = 6s  (Decibel!, )
     Re: RES: RES: select on 1milion register = 6s  (Decibel!, )
   Re: select on 1milion register = 6s  ("Scott Marlowe", )
    Re: select on 1milion register = 6s  (Alvaro Herrera, )
    Re: select on 1milion register = 6s  (Jan Dittmer, )
 Re: select on 1milion register = 6s  (Hervé Piedvache, )
  RES: select on 1milion register = 6s  ("Bruno Rodrigues Siqueira", )
  RES: select on 1milion register = 6s  ("Bruno Rodrigues Siqueira", )

Data_encerramento is a timestamp column


I will try your tip.
Thanks


-----Mensagem original-----
De: 
[mailto:] Em nome de Ragnar
Enviada em: sábado, 28 de julho de 2007 19:36
Para: Bruno Rodrigues Siqueira
Cc: 
Assunto: Re: RES: [PERFORM] select on 1milion register = 6s

On lau, 2007-07-28 at 17:12 -0300, Bruno Rodrigues Siqueira wrote:

> where
>
> to_char( data_encerramento ,'yyyy-mm')
> between   '2006-12' and  '2007-01'

assuming data_encerramento is a date column, try:
WHERE data_encerramento between   '2006-12-01' and  '2007-01-31'

gnari



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend



pgsql-performance by date:

From: "Bruno Rodrigues Siqueira"
Date:
Subject: RES: select on 1milion register = 6s
From: "Scott Marlowe"
Date:
Subject: Re: select on 1milion register = 6s