Re: Simple indexed IN query takes 40 seconds

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Simple indexed IN query takes 40 seconds
Date: 2008-11-10 18:23:41
Message-ID: FA5481C37B434A5A8514435353F23019@andrusnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom,

> Using something newer than 8.1 would help.

Thank you.

If

CREATE TEMP TABLE ids ( id int ) ON COMMIT DROP;

is created, ids are added to this table and
ids table is used in inner join insted of IN clause or

IN clause is replaced with

... dokumnr IN ( SELECT id FROM ids ) ...

, will this fix the issue in 8.1.4 ?

Andrus.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-11-10 18:31:38 Re: Oddity with view
Previous Message Richard Huxton 2008-11-10 18:21:27 Re: Oddity with view