[PERFORM] Speed up a function?CREATE TABLE readings ( "when" TIMESTAMP DEFAULT timeofday()::timestamp NOT NULL PRIMARY KEY, "barometer" FLOAT DEFAULT NULL,

2004-06-07 Thread Robert Creager
Hey All, I've implemented a couple of functions ala date_trunc (listed at the bottom). These functions are executed every 5 minutes (date_trunc_minute) and every week (date_trunc_week) across 16 different values. The problem is that they take way too long to execute (nearly 7x the 'regular' dat

Re: [PERFORM] Speed up a function?CREATE TABLE readings ( "when" TIMESTAMP DEFAULT timeofday()::timestamp NOT NULL PRIMARY KEY, "barometer" FLOAT DEFAULT NULL,

2004-02-24 Thread Tom Lane
Robert Creager <[EMAIL PROTECTED]> writes: > I've implemented a couple of functions ala date_trunc (listed at the bottom) > [ and they're too slow ] Well, it's hardly surprising that a function that invokes date_trunc and half a dozen other comparably-expensive operations should be half a dozen ti