Re: Highly obscure and erratic

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Varun Kacholia <varunk(at)cse(dot)iitb(dot)ac(dot)in>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Highly obscure and erratic
Date: 2002-06-18 22:10:53
Message-ID: 20020618150951.B65974-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 19 Jun 2002, Varun Kacholia wrote:

> hi,
> I cannot get what causes the difference in the execution of these 2 commands
> 1. SELECT * FROM dbmedia WHERE ID IN ((SELECT id FROM wdmedia WHERE word = 'whatever') ) LIMIT 20;
> 2. SELECT * FROM dbmedia WHERE ID IN (1234,2345,1242,1256,1245,1567,2222,22,345,234,567,456,35,56) ;

The former is not very well optimized (see the FAQ for suggestions on
using EXISTS instead).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Harding 2002-06-18 22:12:06 CAST(null as date)...
Previous Message John Gray 2002-06-18 22:06:12 Re: point-in-polygon error