Re: PostgreSQL performance in simple queries - Mailing list pgsql-performance

From Neil Conway
Subject Re: PostgreSQL performance in simple queries
Date
Msg-id 40ABD6CC.3070206@samurai.com
Whole thread Raw
In response to PostgreSQL performance in simple queries  (Eugeny Balakhonov <c0ff75@mail.ru>)
Responses Re: PostgreSQL performance in simple queries
List pgsql-performance
Eugeny Balakhonov wrote:
> I tries to run simple query:
>
> select * from files_t where parent = 3333

Use this instead:

select * from files_t where parent = '3333';

("parent = 3333::int8" would work as well.)

PostgreSQL (< 7.5) won't consider using an indexscan when the predicate
involves an integer literal and the column datatype is int2 or int8.

-Neil

pgsql-performance by date:

Previous
From: "Gary Doades"
Date:
Subject: Re: PostgreSQL performance in simple queries
Next
From: Bruce Momjian
Date:
Subject: Re: Wierd context-switching issue on Xeon