Michael Robinson <robinson@netrinsics.com> writes:
> Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
>> We assume that most data stays inside the database on every query.
>> That is, one should optimize for comparison/calculation speed, not
>> formatting speed. If you are comparing a bunch of rows to return one,
>> you will be much happier if the comparison happens quickly, as opposed
>> to doing that slowly but formatting the single output value quickly.
> The optimizations under discussion will not significantly affect comparison
> speed one way or the other, so comparison speed is a moot issue.
On what do you base that assertion? I'd expect comparisons to be sped
up significantly: no need to unpack the storage format, and the inner
loop handles four digits per iteration instead of one.
regards, tom lane