pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedUse of * affect the performance
2+ messages / 2 participants
[nested] [flat]
* Use of * affect the performance
@ 2006-01-16 14:49 Marcos <mjs_ops@gmx.net>
2006-01-16 21:55 ` Re: Use of * affect the performance Qingqing Zhou <zhouqq@cs.toronto.edu>
0 siblings, 1 reply; 2+ messages in thread
From: Marcos @ 2006-01-16 14:49 UTC (permalink / raw)
To: pgsql-performance
Hi,
I always think that use of * in SELECT affected in the performance,
becoming the search slowest.
But I read in the a Postgres book's that it increases the speed of
search.
And now???? What the more fast?
Thanks
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Use of * affect the performance
2006-01-16 14:49 Use of * affect the performance Marcos <mjs_ops@gmx.net>
@ 2006-01-16 21:55 ` Qingqing Zhou <zhouqq@cs.toronto.edu>
0 siblings, 0 replies; 2+ messages in thread
From: Qingqing Zhou @ 2006-01-16 21:55 UTC (permalink / raw)
To: pgsql-performance
"Marcos" <mjs_ops@gmx.net> wrote
>
> I always think that use of * in SELECT affected in the performance,
> becoming the search slowest.
>
> But I read in the a Postgres book's that it increases the speed of
> search.
>
> And now???? What the more fast?
>
If you mean use "*" vs. "explicitely name all columns of a relation", then
there is almost no difference except the negligible difference in parsing.
If you mean you just want part of the columns of a relation but you still
use "*": Yes, you will save one projection operation for each result row but
you will pay for more network traffic. In the worst case, say your "*"
involves some toast attributes, you just hurt performance. Considering the
benefits is so marginal and dangerous, I suggest stay with the idea that
"only retrive the columns that you are interested in".
Regards,
Qingqing
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-01-16 21:55 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-16 14:49 Use of * affect the performance Marcos <mjs_ops@gmx.net>
2006-01-16 21:55 ` Qingqing Zhou <zhouqq@cs.toronto.edu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox