Re: [HACKERS] Interesting behaviour !

From: Hannu Krosing <hannu(at)trust(dot)ee>
To: Constantin Teodorescu <teo(at)flex(dot)ro>
Cc: "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Interesting behaviour !
Date: 1999-07-14 10:27:54
Message-ID: 378C662A.B3FFD088@trust.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Constantin Teodorescu wrote:
>
>
> create table "note" (id serial,perioada int2,schema int2,explicatie
> text,...);
>
...
>
> contabil=> explain select * from note where perioada=15;
> NOTICE: QUERY PLAN:
> Seq Scan on note (cost=1099.99 rows=1600 width=87)

You may try :

explain select * from note where perioada=15::int2;

i think that the default for 'untyped' numbers is int4 and
this currently confuses the optimiser.

------------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff MacDonald 1999-07-14 12:12:05 Re: [HACKERS] Updated TODO list
Previous Message Uncle George 1999-07-14 10:23:22 RedHat6.0 & Alpha