pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Davies <scldad@sdc.com.au>
To: Michael Glaesemann <grzm@seespotcode.net>
Cc: Russell Smith <mr-russ@pws.com.au>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimising "in" queries
Date: Thu, 23 Aug 2007 09:00:13 +0930
Message-ID: <200708230900.13878.scldad@sdc.com.au> (raw)
In-Reply-To: <AAF53AEE-B98C-45BD-B80F-8FA528BFB98B@seespotcode.net>
References: <200708221210.36770.scldad@sdc.com.au>
	<46CC16F3.7060606@pws.com.au>
	<AAF53AEE-B98C-45BD-B80F-8FA528BFB98B@seespotcode.net>

Interesting semantics. I have never seen  the IN syntax referred to as 
"array processing" before.

I have always thought of array processing as the thing that vector 
processors such as Cray and ETA do/did.

While superficially equivalent, I have always believed that IN (a,b,c) 
executed faster than =a or =b or =c. Am I wrong for PostgreSQL?

Stephen

 On Wednesday 22 August 2007 22:55, Michael Glaesemann wrote:
> On Aug 22, 2007, at 5:58 , Russell Smith wrote:
> > Stephen Davies wrote:
> >> select count(rdate),rdate from reading where sensor_id in
> >> (1137,1138,1139,1140) group by rdate order by rdate desc limit 1;
> >
> > It would have been helpful to see the table definition here.  I can
> > say up front that array processing in postgres is SLOW.
>
> Um, what array processing are you seeing here? IN (a, b, b) is not an
> array construct.
>
> Michael Glaesemann
> grzm seespotcode net

-- 
========================================================================
This email is for the person(s) identified above, and is confidential to
the sender and the person(s).  No one else is authorised to use or
disseminate this email or its contents.

Stephen Davies Consulting                            Voice: 08-8177 1595
Adelaide, South Australia.                             Fax: 08-8177 0133
Computing & Network solutions.                       Mobile:0403 0405 83



view thread (13+ messages)  latest in thread

Message-ID: <200708230900.13878.scldad@sdc.com.au>
Permalink:  ../200708230900.13878.scldad@sdc.com.au/
Also on:    postgresql.org/message-id/200708230900.13878.scldad@sdc.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: scldad@sdc.com.au, grzm@seespotcode.net, mr-russ@pws.com.au
  Subject: Re: Optimising "in" queries
  In-Reply-To: <200708230900.13878.scldad@sdc.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox