(partial?) indexes, LIKE and NULL

From: "Marinos J(dot) Yannikos" <mjy(at)geizhals(dot)at>
To: pgsql-performance(at)postgresql(dot)org
Subject: (partial?) indexes, LIKE and NULL
Date: 2004-01-27 19:26:06
Message-ID: 4016BB4E.7030107@geizhals.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

with the following table:

Table "public.foo"
Column | Type | Modifiers
--------+------+-----------
t | text |
Indexes:
"a" btree (t)

Shouldn't queries that use
... where t like '%something%'

benefit from "a" when t is NULL in almost all cases, since the query
planner could use "a" to access the few non-NULL rows quickly? It
doesn't seem to work right now.

(I assume that it would make no difference if the index "a" was partial,
excluding NULLs)

Regards,
-mjy

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bill Moran 2004-01-27 19:39:21 Re: On the performance of views
Previous Message Joshua D. Drake 2004-01-27 18:52:21 pl/pgSQL versus pl/Python