Re: Need indexes on empty tables for good performance ?

Поиск
Список
Период
Сортировка
От Thomas F. O'Connell
Тема Re: Need indexes on empty tables for good performance ?
Дата
Msg-id 2408BBD7-2C6D-4FAD-82ED-A8E9DC07D83A@sitening.com
обсуждение исходный текст
Ответ на Need indexes on empty tables for good performance ?  ("Lenard, Rohan (Rohan)" <rlenard@avaya.com>)
Список pgsql-performance
Rohan,

You should note that in Postgres, indexes are not inherited by child tables.

Also, it seems difficult to select from a child table whose name you don't know unless you access the parent. And if you are accessing the data via the parent, I'm reasonably certain that you will find that indexes aren't used (even if they exist on the children) as a result of the way the children are accessed.

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Strategic Open Source: Open Your i™

110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-469-5150
615-469-5151 (fax)

On Aug 22, 2005, at 10:41 PM, Lenard, Rohan (Rohan) wrote:

I've read that indexes aren't used for COUNT(*) and I've noticed (7.3.x) with EXPLAIN that indexes never seem to be used on empty tables - is there any reason to have indexes on empty tables, or will postgresql never use them.
 
This is not as silly as it sounds - with table inheritance you might have table children with the data and a parent that is empty.  It'd be nice to make sure postgresql knows to never really look at the parent - especially is you don't know the names of all the children ..
 
Thoughts ?
 
thx,
  Rohan

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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: getting an index to work with partial indices ...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: getting an index to work with partial indices ...