pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marinos J. Yannikos <mjy@geizhals.at>
To: pgsql-performance@postgresql.org
Subject: (partial?) indexes, LIKE and NULL
Date: Tue, 27 Jan 2004 20:26:06 +0100
Message-ID: <4016BB4E.7030107@geizhals.at> (raw)

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




view thread (3+ messages)  latest in thread

Message-ID: <4016BB4E.7030107@geizhals.at>
Permalink:  ../4016BB4E.7030107@geizhals.at/
Also on:    postgresql.org/message-id/4016BB4E.7030107@geizhals.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mjy@geizhals.at
  Subject: Re: (partial?) indexes, LIKE and NULL
  In-Reply-To: <4016BB4E.7030107@geizhals.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox