From: | GH <grasshacker(at)over-yonder(dot)net> |
---|---|
To: | Alvar Freude <alvar(dot)freude(at)merz-akademie(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: What's faster: value of 0 or NULL with index |
Date: | 2000-12-11 04:06:24 |
Message-ID: | 20001210220624.A97371@over-yonder.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Dec 11, 2000 at 04:28:24AM +0100, some SMTP stream spewed forth:
> Hi,
>
> I'm thinking about, what might be faster on SELECTs: a column with index
> which is NOT NULL and takes the value of 0 or a column which can take
> the NULL value instead of 0, also with index.
>
> My feeling sais, that 0 and NOT NULL should be a lot more faster, but
> perhaps it's not true?
If your SELECT uses the index on the NOT NULL column, then yes, the
indexed 0 should be faster. I think it takes less space as well.(?)
gh
>
>
> bye
> Alvar
>
>
> --
> Alvar C.H. Freude | alvar(dot)freude(at)merz-akademie(dot)de
>
> Demo: http://www.online-demonstration.org/ | Mach mit!
> Blast-DE: http://www.assoziations-blaster.de/ | Blast-Dich-Fit
> Blast-EN: http://www.a-blast.org/ | Blast/english
From | Date | Subject | |
---|---|---|---|
Next Message | George Johnson | 2000-12-11 04:23:34 | mysql issues |
Previous Message | Alvar Freude | 2000-12-11 03:28:24 | What's faster: value of 0 or NULL with index |