(partial?) indexes, LIKE and NULL

Поиск
Список
Период
Сортировка
От Marinos J. Yannikos
Тема (partial?) indexes, LIKE and NULL
Дата
Msg-id 4016BB4E.7030107@geizhals.at
обсуждение исходный текст
Ответы Re: (partial?) indexes, LIKE and NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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


В списке pgsql-performance по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: pl/pgSQL versus pl/Python
Следующее
От: Bill Moran
Дата:
Сообщение: Re: On the performance of views