Re: Feedback about Drupal SQL debugging
От | Stephen Frost |
---|---|
Тема | Re: Feedback about Drupal SQL debugging |
Дата | |
Msg-id | 20090822010904.GX23840@tamriel.snowman.net обсуждение исходный текст |
Ответ на | Re: Feedback about Drupal SQL debugging (Greg Stark <gsstark@mit.edu>) |
Ответы |
Re: Feedback about Drupal SQL debugging
Re: Feedback about Drupal SQL debugging |
Список | pgsql-hackers |
* Greg Stark (gsstark@mit.edu) wrote: > You would have to specify the key. I think typically you would have > something like: > > SELECT a.*, sum(b.col) > FROM a,b > GROUP BY a.pk Ahhh, ok, this makes more sense. This is SQL standard? Do we have a TODO for it? > The database knows that it can use those values from any output row of > the group since they'll all come from the same orginal row of a. Or > possibly it could use some plan that doesn't involve multiplying that > data in the first place. Right. It strikes me as a relativly small amount of work to get the initial "just add the columns to the group by" logic implemented. I'd start from exactly where that ERROR comes from, to minimize any performance hit from having to go figure out if the columns in the GROUP BY comprise a key. Doing something different in the planner based on that could come later, if necessary. I havn't looked at any code yet, but those who are familiar with these areas- any gotchas you can think of off-hand to make this more difficult than I'm hoping it is? Thanks, Stephen
В списке pgsql-hackers по дате отправления: