Re: Trouble to understand plain of postgresql

From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trouble to understand plain of postgresql
Date: 2003-06-10 05:32:42
Message-ID: 3EE5BAD2.29289.80E54C9@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9 Jun 2003 at 18:57, Cristian Custodio wrote:

> explain analyze
> select ven.filcli, ven.codcli, rec.datven
> from tt_ven ven, tt_rec rec
> where ven.codfil = rec.codfil
> and ven.sequen = rec.sequen
> and rec.datven between to_date('01/03/2003 00:00:00', 'dd/mm/yyyy
> hh24:mi:ss')
> and to_date('03/03/2003 23:59:59', 'dd/mm/yyyy
> hh24:mi:ss')
> and rec.flgest = 'A'
>
>
> Nested Loop (cost=0.00..12.03 rows=1 width=67) (actual time=114.00..114.00
> rows=0 loops=1)
> -> Index Scan using i_lc_rec_datven_flgest on tt_rec rec ...
> Index Cond: ((datven >= '2003-03-01 00:00:00'::timestamp ...
> -> Index Scan using pk_ven on tt_ven ven (cost=0.00..6.01 rows=1 width=38)
> (never executed)
> Index Cond: ((ven.codfil = "outer".codfil) AND (ven.sequen =
> "outer".sequen))
> Total runtime: 115.00 msec
> Here it use INDEX SCAN i_lc_rec_datven_flgest

Just a guess, is rec.datven a date field and not a timestamp?

Bye
Shridhar

--
I've already got a female to worry about. Her name is the Enterprise. --
Kirk, "The Corbomite Maneuver", stardate 1514.0

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-06-10 05:34:30 Re: Pg_dumpall from different versions
Previous Message Shridhar Daithankar 2003-06-10 05:12:25 Re: Estimate of when CVS will be available again?