>> You should just cross out that whole section. It's just flatly wrong.
>>
>> I had always assumed it was just people bringing assumptions over from
>> Oracle where it is true. Perhaps this book is to blame for some of the
>> confusion. Which book is it?
>>
>> Postgres indexes NULLs. It can use
>> 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."
>
> Yo
> You should just cross out that whole section. It's just flatly wrong.
>
> I had always assumed it was just people bringing assumptions over from
> Oracle where it is true. Perhaps this book is to blame for some of the
> confusion. Which book is it?
>
> Postgres indexes NULLs. It can use them fo
Hello,
Greg Stark wrote:
Tom Lane <[EMAIL PROTECTED]> writes:
The paragraph continues:
"If the SELECT command included the clause WHERE phone NOT NULL,
PostgreSQL could use the index to satisfy the ORDER BY clause.
An index that covers optional (NOT NULL) columns will not be used to
speed table
Tom Lane <[EMAIL PROTECTED]> writes:
> > The paragraph continues:
> > "If the SELECT command included the clause WHERE phone NOT NULL,
> > PostgreSQL could use the index to satisfy the ORDER BY clause.
> > An index that covers optional (NOT NULL) columns will not be used to
> > speed table join
Hello Tom,
Tom Lane wrote:
T E Schmitz <[EMAIL PROTECTED]> writes:
Greg Stark wrote:
Which book is it?
PostgreSQL by Korry Douglas + Susan Douglas, ISBN 0-7357-1257-3; Feb 2003
Hmm, I've heard of that book but never seen it. The authors are not
participants in the PG community --- AFAICT neither
T E Schmitz <[EMAIL PROTECTED]> writes:
> Greg Stark wrote:
>> Which book is it?
> PostgreSQL by Korry Douglas + Susan Douglas, ISBN 0-7357-1257-3; Feb 2003
Hmm, I've heard of that book but never seen it. The authors are not
participants in the PG community --- AFAICT neither of them have ever
p
Hello Greg,
Greg Stark wrote:
T E Schmitz <[EMAIL PROTECTED]> writes:
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."
You should just cross out that whole
T E Schmitz <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> 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 NUL
T E Schmitz <[EMAIL PROTECTED]> writes:
> 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 r
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 Pos
T E Schmitz <[EMAIL PROTECTED]> writes:
> You must've been reading my mind. I was just wondering what to do about
> indexing on that particular table. 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
Hello Jean-Luc,
You must've been reading my mind. I was just wondering what to do about
indexing on that particular table. 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?
For the sake of the ex
select ... order by "FROM" is not null, "FROM";
If you have large amount of rows (with or without nulls) it is faster if
use a partial index.
create index ... on ...("FROM");
create index ... on ...("FROM") where "FROM" is null;
JLL
[EMAIL PROTECTED] wrote:
Use the coalesce() function. (coalesce
Use the coalesce() function. (coalesce returns the first non-null value in its list)
Specifically
ORDER BY coalesce("TO", 0), "FROM"
If you have records in "TO" column whose values is LESS then 0, then you need to
replace 0 with
something that sorts BEFORE the first most value that your TO res
15 matches
Mail list logo