Re: Suppressing unused subquery output columns
От | Robert Haas |
---|---|
Тема | Re: Suppressing unused subquery output columns |
Дата | |
Msg-id | CA+TgmoaY+PLWNM-TQnP6uzJUJhhBL8vGeeiqftbo=pHgTXf3ww@mail.gmail.com обсуждение исходный текст |
Ответ на | Suppressing unused subquery output columns (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Suppressing unused subquery output columns
|
Список | pgsql-hackers |
On Thu, Jun 5, 2014 at 10:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > The attached draft patch fixes this by deleting unused output expressions > from unflattened subqueries, so that we get: > > regression=# explain select f1 from (select * from t1 left join t2 on f1=f2 limit 1) ss; > QUERY PLAN > ------------------------------------------------------------------ > Subquery Scan on ss (cost=0.00..0.02 rows=1 width=4) > -> Limit (cost=0.00..0.01 rows=1 width=4) > -> Seq Scan on t1 (cost=0.00..34.00 rows=2400 width=4) > Planning time: 0.193 ms > (4 rows) > > I'm not entirely convinced that it's worth the extra planning cycles, > though. Given the small number of complaints to date, it might not > be worth doing this. Thoughts? I've encountered this issue before and think it would be great to fix it. I'm not sure precisely how many cycles it's worth paying, but definitely more than zero. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: