Moises Lopez <moylop...@vauxoo.com> writes:
>     ->  Seq Scan on public.link l1  (cost=0.00..10.40 rows=40 width=516)
> (actual time=0.010..0.011 rows=1 loops=1)
> *            Output: l1.id <http://l1.id>, l1.url, l1.name
> <http://l1.name>, l1.description, l1.rel*

This is normal; it is not a bug, and it is not a source of performance
issues either.  The planner is choosing to do that to avoid a projection
step in this plan node, because there's no need for one.  On the other
scan, where it *is* important to project out just the required columns to
minimize the size of the hash table above the scan, it does do so:

>             ->  Seq Scan on public.link l2  (cost=0.00..10.40 rows=40
> width=516) (actual time=0.010..0.011 rows=1 loops=1)
>                 Output: l2.url

> Is there a manner to avoid returning all columns in order to get a better
> performance?

You have not shown us anything about what your actual performance
issue is, but this isn't it.

https://wiki.postgresql.org/wiki/Slow_Query_Questions

                        regards, tom lane


Reply via email to