
> mydb=# create index str_idx_url on str(url) where url is not null;
> CREATE
> mydb=# analyze str;
> ANALYZE
> mydb=# EXPLAIN ANALYZE select id from str where url='foobar';
> NOTICE:  QUERY PLAN:
> 
> Seq Scan on str  (cost=0.00..91.05 rows=3 width=4) (actual 

You can try an index like:
create index str_idx_url on str(url) where url >= ''; 

I think that should be identical. ('' is the smallest string, no ?)

Andreas

Wed, 13 Nov 2002 14:02:16 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: null values / partial indices