Re: [HACKERS] psql nested queries with 2000+ records

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: coronach(at)hill-b-073(dot)resnet(dot)purdue(dot)edu (Coronach)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] psql nested queries with 2000+ records
Date: 1998-03-20 17:24:05
Message-ID: 199803201724.MAA08299@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> I have noted with 2000+ records in a table (using a btree unique index on
> the primary key, btw) performance of a query takes 15+ minutes to respond.
>
> The query is in the structure of this
>
> select foo from bar where foo in (select foo from bar where bazzfoo like
> 'Word%');

Very strange. 15+ minutes? Wow, that is terrible, even longer than a
sequential scan of the table. Try EXPLAIN and tell us what it says in
the two cases.

>
> Just reporting a possible bug..
>
> With smaller amounts of records, responce time is within a few seconds.
>
> Other information you might want:
>
> postgres version: 6.3
> os: BSDI 3.1

Same OS here.
--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-03-20 17:29:18 Re: [HACKERS] tables >2GB
Previous Message Bruce Momjian 1998-03-20 17:19:42 Re: [HACKERS] DEC Alpha and HAVE_INT_TIMEZONE