Re: Feedback about Drupal SQL debugging

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Feedback about Drupal SQL debugging
Дата
Msg-id 25669.1250906107@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Feedback about Drupal SQL debugging  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> The first step is probably to do the opposite of what we're talking
> about here: cases where people *have* added extra columns to the GROUP
> BY key so they can use those columns in their select list. We can
> remove those columns from the sort or hash comparison key if there's a
> column (or columns) which is a unique constraint key for the same
> source. Similarly we can remove columns from an ORDER BY if the order
> key has earlier columns which are already a unique key for the same
> source.

This is something we could only do at plan time --- if we do it at parse
time we risk making a robust query into one that will break when
somebody drops a constraint.  So it's not really the inverse of the
other case.
        regards, tom lane


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Feedback about Drupal SQL debugging
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Feedback about Drupal SQL debugging