Re: Performance glitch in GetCurrentAbsoluteTime()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Performance glitch in GetCurrentAbsoluteTime()
Date: 1999-11-04 16:31:44
Message-ID: 23183.941733104@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
> (back online after a week of downtime)

I was wondering why you were so quiet. Hardware trouble?

>> What I'm inclined to do is arrange for these variables to be calculated
>> only on-demand, at most once per transaction.

> At most once per transaction is what I was hoping the behavior already
> is.

Actually, my gripe is that it's done in every transaction whether
needed or not...

> Anyway, if we can take the time() result and *later* figure out
> the other values, then we could:

> 1) clear a flag when time() is called
> 2) use a wrapper around a stripped GetCurrentAbsoluteTime() for
> date/time support
> 3) if the flag in (1) is clear, then evaluate the other parameters

Right, that was pretty much what I was thinking too. As long as
CTimeZone &etc are evaluated using the time value saved at the
start of the transaction, the behavior will be the same.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-11-04 16:34:50 Re: [HACKERS] VIEWS, DISTINCT and COUNT
Previous Message The Hermit Hacker 1999-11-04 16:30:55 Re: [HACKERS] PostgreSQL 6.5.3 built, but not released ...