Hello Tom,

Tom Lane wrote:

T E Schmitz <[EMAIL PROTECTED]> 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

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

Reply via email to