Re: null values / partial indices

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Mario Weilguni" <mario(dot)weilguni(at)icomedias(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: null values / partial indices
Date: 2002-11-13 13:02:16
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4961EEE@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Mario Weilguni 2002-11-13 13:09:34 Re: null values / partial indices
Previous Message Mario Weilguni 2002-11-13 12:43:42 null values / partial indices