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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: slow IN() clause for many cases


  • From: Joe Conway <mail(at)joeconway(dot)com>
  • To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: slow IN() clause for many cases
  • Date: Tue, 29 Nov 2005 14:39:12 -0800
  • Message-id: <438CD890(dot)90606(at)joeconway(dot)com>

Tom Lane wrote:
Simon Riggs <simon(at)2ndquadrant(dot)com> writes:

Do you think we'll be able to generate a single ScalarArrayOpExpr from a
small subselect and pass it through as an indexable expression?

If you don't mind spelling it with the ARRAY(sub-select) syntax, which
I think is a Postgres-ism (though it's possible Joe got it from
SQL2003).

It's in SQL 2003. See excerpt below.

Joe

6.36 <array value constructor>

Function

  Specify construction of an array.

Format

  <array value constructor> ::=
    <array value constructor by enumeration> |
    <array value constructor by query>
  <array value constructor by enumeration> ::=
    ARRAY <left bracket or trigraph>
          <array element list>
          <right bracket or trigraph>
  <array value constructor by query> ::=
    ARRAY <left paren>
          <query expression> [ <order by clause> ]
          <right paren>



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group