Skip site navigation (1) Skip section navigation (2)

(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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group