Home > Archive > PostgreSQL Performance > January 2006 > Use of * affect the performance









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Use of * affect the performance
Marcos

2006-01-16, 11:29 am

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


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Qingqing Zhou

2006-01-16, 8:24 pm


"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


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com