Re: [HACKERS] memory dilemma
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] memory dilemma |
| Дата | |
| Msg-id | 26286.946310966@sss.pgh.pa.us обсуждение |
| Ответ на | Re: [HACKERS] memory dilemma (Karel Zak - Zakkr <zakkr@zf.jcu.cz>) |
| Ответы |
Re: [HACKERS] memory dilemma
|
| Список | pgsql-hackers |
Karel Zak - Zakkr <zakkr@zf.jcu.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
В списке pgsql-hackers по дате отправления: