Re: (another ;-)) PostgreSQL-derived project ... - Mailing list pgsql-general

From Alban Hertroys
Subject Re: (another ;-)) PostgreSQL-derived project ...
Date
Msg-id ED5C651F-CE27-45C4-B7A6-252AD0852471@gmail.com
Whole thread Raw
In response to Re: (another ;-)) PostgreSQL-derived project ...  (Albretch Mueller <lbrtchx@gmail.com>)
List 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
datecolumn 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
representationdoesn'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.



pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: New feature: accumulative functions.
Next
From: "Edson Carlos Ericksson Richter"
Date:
Subject: Alter column...using failure under 9.0.4