On Thu, Jul 19, 2007 at 05:52:30AM -0700, Paul Codler wrote:
> Basic query optimization question- does Postgres process
>
>x IN (y1, y2)
> as fast as
>(x = y1 OR x = y2)
>
> in a function?
EXPLAIN indicates this.
Peter
---(end of broadcast)---
Basic query optimization question- does Postgres process
x IN (y1, y2)
as fast as
(x = y1 OR x = y2)
in a function?
Basic query optimization question- does Postgres process
x IN (y1, y2)
as fast as
(x = y1 OR x = y2)
in a function?
Nevermind. I used:
OPEN test FOR EXECUTE 'SELECT a, b, c FROM tbl WHERE d IN ' values;
Nik wrote:
> I have a dynamic set of clauses that I would like to use in the cursor.
> Is there a way to achieve this using the "IN" clause and a string, or
> multiple "OR" clauses coupled with strings.
>
> Thi
On Mon, Nov 27, 2006 at 05:24:31PM -0600, Jim Nasby wrote:
> In any case, like Oracle, PostgreSQL does not index NULL values (at
> least not in btree).
Actually, PostgreSQL does store NULL values in an index, otherwise you
could never use them for full index scans (think multicolumn indexes).
Yo
On Nov 24, 2006, at 9:04 AM, Marcus Engene wrote:
There is one other case where I personally find nullable
columns a good thing: process_me ish flags. When a row
is not supposed to be processed that field is null and
when a field is null it wont be in the index [at least
on Oracle].
Actually, t
> yes, except I think you meant:
> (unknown or false or false) = unknown
>
> as can be demonstrated by:
>
> test=# \pset null 'null'
> Null display is "null".
> test=# select (null or true);
> ?column?
> --
> t
> (1 row)
>
> test=# select (null or false);
> ?column?
> --
> nu
On fös, 2006-11-24 at 10:10 -0800, Richard Broersma Jr wrote:
> > That is fine
> > but what I was actually expecting is this
> > if
> > select * from table where col_name in (null, 'a', 'b');
> >
> > to return those rows where col_name is null or if it = a or if it is = b
> >
> > But i think i
> That is fine
> but what I was actually expecting is this
> if
> select * from table where col_name in (null, 'a', 'b');
>
> to return those rows where col_name is null or if it = a or if it is = b
>
> But i think in does not not support null queries , am i right?
>
that is correct: if col_
D]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn van
Oosterhout
Sent: Friday, November 24, 2006 7:20 AM
To: surabhi.ahuja
Cc: A. Kretschmer; pgsql-general@postgresql.org
Subject: Re: [GENERAL] IN clause
On Fri, Nov 24, 2006 at 05:31:07PM +0530, surabhi.ahuja wrote:
That is fine
but what I wa
TECTED] On Behalf Of Martijn van
Oosterhout
Sent: Friday, November 24, 2006 7:20 AM
To: surabhi.ahuja
Cc: A. Kretschmer; pgsql-general@postgresql.org
Subject: Re: [GENERAL] IN clause
On Fri, Nov 24, 2006 at 05:31:07PM +0530, surabhi.ahuja wrote:
> That is fine
> but what I was actually expect
surabhi.ahuja wrote:
> That is fine
> but what I was actually expecting is this
> if
> select * from table where col_name in (null, 'a', 'b');
>
> to return those rows where col_name is null or if it = a or if it is = b
>
> But i think in does not not support null queries , am i right?
Expres
On Fri, Nov 24, 2006 at 05:31:07PM +0530, surabhi.ahuja wrote:
> That is fine
> but what I was actually expecting is this
> if
> select * from table where col_name in (null, 'a', 'b');
>
> to return those rows where col_name is null or if it = a or if it is = b
>
> But i think in does not not
__
From: [EMAIL PROTECTED] on behalf of A. Kretschmer
Sent: Fri 11/24/2006 2:59 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] IN clause
am Fri, dem 24.11.2006, um 14:42:30 +0530 mailte surabhi.ahuja folgendes:
> Hi,
>
> i have a table
> and i have the query se
am Fri, dem 24.11.2006, um 14:42:30 +0530 mailte surabhi.ahuja folgendes:
> Hi,
>
> i have a table
> and i have the query select * from table where col_name is null;
>
> it returns some rows
>
> now, say i have to implement the same query using the in clause how shold it
> be
> done?
>
>
Hi,
i have a table
and i have the query select * from table where col_name is null;
it returns some rows
now, say i have to implement the same query using the in clause how shold it be
done?
select * from table where col_name in (null);
but it does not return any rows.
Can you please
16 matches
Mail list logo