Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL performance in simple queries

From: Neil Conway <neilc(at)samurai(dot)com>
To: Eugeny Balakhonov <c0ff75(at)mail(dot)ru>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL performance in simple queries
Date: 2004-05-19 21:51:08
Message-ID: 40ABD6CC.3070206@samurai.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

In response to

Responses

pgsql-performance by date

Next:From: Bruce MomjianDate: 2004-05-20 01:20:20
Subject: Re: Wierd context-switching issue on Xeon
Previous:From: Gary DoadesDate: 2004-05-19 20:23:47
Subject: Re: PostgreSQL performance in simple queries

pgsql-hackers by date

Next:From: pgsqlDate: 2004-05-19 22:51:29
Subject: Re: Table Spaces
Previous:From: Bruce MomjianDate: 2004-05-19 21:21:12
Subject: Re: [HACKERS] pg_dump end comment

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group