Re: Opptimizing projections containing unused columns

Поиск
Список
Период
Сортировка
От 陈伟楠
Тема Re: Opptimizing projections containing unused columns
Дата
Msg-id 0K8T00O6QNCV51A0@staff-jes1.sina.com.cn
обсуждение исходный текст
Ответ на Opptimizing projections containing unused columns  ("Andrus" <kobruleht2@hot.ee>)
Список pgsql-general
Andrus,Hi!

       1.From the query plan,it makes no difference.

       2.PostgreSQL 8.0+ will not exclude columns c3..c20 while executing.

       3.I just make a test,From query plan or executing time,it makes no difference.

   I'm from China.I hope you could see what I mean :)

============================================================

>I have lot of autogenerated from projection queries in form
>
>SELECT source.c1, source.c2, t1.col1, t1.col2, ...
>FROM (SELECT c1, c2, c3, ..... , c20 FROM ... WHERE ... ) source
>LEFT JOIN t2 USING (somecolumn)
>
>Main SELECT uses only few columns (source.c1 and source.c2 in this sample)
>from source projection.
>Inner table may have up to 500000 rows.
>
>I read 8.4 WITH documentation and this describes somewhat that PostgreSQL
>can discard unused columns automatically but this is not clear. I havent
>found exact doc about this. I havent way how to determine this using EXPLAIN
>or similar command.
>
>Questions:
>
>1. Does selecting of unused columns ( c3 ... c20) affect to query prefomance 
>?
>2. Will PostgreSQL 8.0+ automatically exclude columns c3 .. c20 while 
>executing
>query ?
>3. Or should I make sql builder much more sophisticated so that it will not
>generate columns c3 .. c20 when it creates sql ?
>
>Andrus. 
>
>
>-- 
>Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-general

weinna.chen

Beijing China

В списке pgsql-general по дате отправления:

Предыдущее
От: Tomasz Ostrowski
Дата:
Сообщение: Re: Drupal and PostgreSQL - performance issues?
Следующее
От: Mark Morgan Lloyd
Дата:
Сообщение: Re: Numbering rows