Re: ORDER BY and NULLs

Поиск
Список
Период
Сортировка
От T E Schmitz
Тема Re: ORDER BY and NULLs
Дата
Msg-id 414DBF6D.8040500@numerixtechnology.de
обсуждение исходный текст
Ответ на Re: ORDER BY and NULLs  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ORDER BY and NULLs
Re: ORDER BY and NULLs
Список pgsql-sql
Hello Tom,

Tom Lane wrote:

> T E Schmitz <mailreg@numerixtechnology.de> writes:
> 
>>I read somewhere that an Index is not 
>>going to improve the performance of an ORDER BY if the sort column 
>>contains NULLs because NULLs aren't indexed?
> 
> Whatever you were reading had it pretty badly garbled :-(

I just dug out the PostgreSQL book again because I thought I might've 
garbled it:

Quote: "PostgreSQL will not index NULL values. Because an index will 
never include NULL values, it cannot be used to satisfy the ORDER BY 
clause of a query that returns all rows in a table."


> Btree indexes *do* store nulls, so the presence of nulls doesn't affect

Thank you for your explanations. At the moment the table has only 1300 
entries and any query is responsive. I'm just planning ahead...

-- 


Regards/Gruß,

Tarlika Elisabeth Schmitz


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to check postgres running or not ?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: ORDER BY and NULLs