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.