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

Re: Index usage for BYTEA column in OR/IN clause

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>,pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Index usage for BYTEA column in OR/IN clause
Date: 2004-03-28 15:48:49
Message-ID: 15883.1080488929@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com> writes:
> The table contain +- 1 mil records, all of the actual version of the 
> queries below return < 10 rows, so an index should be used. Using an 
> index scan, the query ran < 100ms. Using seq scan, 2-3 secs. So there is 
> no good reason why a seq scan should be used, especially in a case of 
> b='foo' or b='bar'.

[shrug...]  We can't possibly diagnose a bad-plan-choice problem with
the amount of information you've provided.  See
http://techdocs.postgresql.org/guides/SlowQueryPostingGuidelines

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Frank FinnerDate: 2004-03-28 15:55:05
Subject: Re: win32 users list (Re: Native Win32 port - PLEASE!)
Previous:From: Jim WilsonDate: 2004-03-28 15:31:18
Subject: Re: win32 users list (Re: Native Win32 port - PLEASE!)

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