Re: [HACKERS] memory dilemma

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Don Baccus <dhogaza(at)pacifier(dot)com>, pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] memory dilemma
Date: 1999-12-27 16:09:26
Message-ID: 26286.946310966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz> writes:
> *Very* simpl test over 10000 rows:

> $ time psql test -c "select date_part('second', d)
> from dtest;" -o /dev/null

> real 0m0.504s
> user 0m0.100s
> sys 0m0.000s

> $ time psql test -c "select to_char(d, 'SI') from
> dtest;" -o /dev/null

> real 0m0.288s
> user 0m0.100s
> sys 0m0.000s

That isn't necessarily an impressive demonstration --- what is the data
type of your "d" column? Four of the six variants of date_part() are
implemented as SQL functions, which naturally adds a lot of overhead...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-12-27 16:14:09 Re: [HACKERS] Logfile rotation
Previous Message Tom Lane 1999-12-27 15:51:05 Re: [HACKERS] Explain plan output