Re: [SQL] Index on nullable column

2006-03-25 Thread Daniel CAUNE
> > Is an index on a nullable column useful for retrieving rows having that > > column null? > > Nope, because IS NULL isn't an indexable operator. > > You can make an end-run around that with a partial index, eg > > create index fooi on foo(f1) where f1 is null > > This can be used to sa

Re: [SQL] Index on nullable column

2006-03-24 Thread Tom Lane
"Daniel Caune" <[EMAIL PROTECTED]> writes: > Is an index on a nullable column useful for retrieving rows having that > column null? Nope, because IS NULL isn't an indexable operator. You can make an end-run around that with a partial index, eg create index fooi on foo(f1) where f1 is nul

[SQL] Index on nullable column

2006-03-24 Thread Daniel Caune
Hi, Is an index on a nullable column useful for retrieving rows having that column null? SELECT PlayerID FROM PlayerLoginSession WHERE EndTime IS NULL; Regards, -- Daniel CAUNE Ubisoft Online Technology (514) 4090 2040 ext. 5418 ---(end of broadcast)