My understanding is that having NULL values in an index breaks it completely.  Meaning 
it won't be used in any query planning.  Maybe I'm wrong though...

-----Original Message-----
From:   Marinos J. Yannikos [mailto:[EMAIL PROTECTED]
Sent:   Tue 1/27/2004 12:26 PM
Subject:        [PERFORM] (partial?) indexes, LIKE and NULL


with the following table:

     Table ""
  Column | Type | Modifiers
  t      | text |
      "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)


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?


Reply via email to