From: Bruno Rodrigues Siqueira <bruno@ravnus.com>
To: 'Ragnar' <gnari@hive.is>
Cc: pgsql-performance@postgresql.org
Subject: RES: RES: select on 1milion register = 6s
Date: Sat, 28 Jul 2007 19:38:54 -0300
Message-ID: <002a01c7d168$16b4a550$e900a8c0@brunolaptop> (raw)
In-Reply-To: <1185662176.5778.314.camel@localhost.localdomain>
Data_encerramento is a timestamp column
I will try your tip.
Thanks
-----Mensagem original-----
De: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-owner@postgresql.org] Em nome de Ragnar
Enviada em: sábado, 28 de julho de 2007 19:36
Para: Bruno Rodrigues Siqueira
Cc: pgsql-performance@postgresql.org
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: bruno@ravnus.com, gnari@hive.is
Subject: Re: RES: RES: select on 1milion register = 6s
In-Reply-To: <002a01c7d168$16b4a550$e900a8c0@brunolaptop>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox