From: Constantin Teodorescu <teo@flex.ro>
To: Hannu Krosing <hannu@trust.ee>
Cc: pgsql-hackers@postgreSQL.org <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Interesting behaviour !
Date: Wed, 14 Jul 1999 12:17:59 +0000
Message-ID: <378C7FF7.D2334A21@flex.ro> (raw)
References: <378C394C.3487DBAC@flex.ro>
<378C662A.B3FFD088@trust.ee>
Hannu Krosing wrote:
>
> 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.
You are right! Thanks a lot! Watch this!
contabil=> explain select * from note where perioada=29::int2;
NOTICE: QUERY PLAN:
Index Scan using note_perioada on note (cost=108.96 rows=1600 width=87)
EXPLAIN
contabil=> explain select * from note where perioada=29;
NOTICE: QUERY PLAN:
Seq Scan on note (cost=1099.99 rows=1600 width=87)
My queries are faster now!
I think that this thing should be fixed. You need more than common SQL
in order to optimize your queries.
That conversions should be automatically assumed by the query optimizer
in order to deliver real performances.
I don't know how difficult that would be.
Thanks a lot,
Best regards,
--
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA
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-hackers@postgresql.org
Cc: teo@flex.ro, hannu@trust.ee
Subject: Re: [HACKERS] Interesting behaviour !
In-Reply-To: <378C7FF7.D2334A21@flex.ro>
* 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