From: | Alban Hertroys <haramrae(at)gmail(dot)com> |
---|---|
To: | Albretch Mueller <lbrtchx(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: (another ;-)) PostgreSQL-derived project ... |
Date: | 2011-09-25 14:14:26 |
Message-ID: | ED5C651F-CE27-45C4-B7A6-252AD0852471@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 25 Sep 2011, at 8:11, Albretch Mueller wrote:
>> ... and can now use those features within my SQL statements/queries.
> ~
> For what exactly? Isn't a comparison on 4 numeric bytes (1 (or 1/2)
> word in modern hardware) more efficient than comparing sequences of
> string characters?
Data types aren't stored in the database as character strings (unless you define your columns as text, of course).
When data in the database gets compared to data in a query (for example, when you use a WHERE clause that compares a date column to a given date), the data in the query gets transformed to the appropriate type (text to date, in this case) - just once. That's efficient enough that the difference in performance between a numerical value and the string representation doesn't matter.
I don't know what you're trying to say in the above, but you seem to base your hypothesis on wrong assumptions.
Alban Hertroys
--
The scale of a problem often equals the size of an ego.
From | Date | Subject | |
---|---|---|---|
Next Message | Edson Carlos Ericksson Richter | 2011-09-25 15:17:28 | Alter column...using failure under 9.0.4 |
Previous Message | David Johnston | 2011-09-25 13:36:35 | Re: New feature: accumulative functions. |