Re: Finding uniques across a big join
От | John D. Burger |
---|---|
Тема | Re: Finding uniques across a big join |
Дата | |
Msg-id | 86241f949f391705b946d0422c58588e@mitre.org обсуждение исходный текст |
Ответ на | Re: Finding uniques across a big join ("Jim C. Nasby" <jim@nasby.net>) |
Ответы |
Re: Finding uniques across a big join
|
Список | pgsql-general |
Jim C. Nasby wrote: > It will probably be a win to come up with a list of potential records > from each table, instead of after doing the 3-way join. so something > like: > > (SELECT gazPlaceID FROM gazPlaces GROUP BY featureType HAVING > count(*)=1) > JOIN > (SELECT ...) Hmm, not sure I understand. Joining the uniques wrt each of the three columns does not result in the unique triples, or even a superset of them, at least in this case. > If you post the output of explain (or explain analyze is even better) > then people could probably make better suggestions. Okay, I just posted the query plan. I will try to run an EXPLAIN ANALYZE tonight. Again, I'm also interested in completely different approaches to discovering the entities with unique attribute combinations. Intuitively, the query I posted is doing "too much work", because it's computing the total count for each combo, when all I really need is to know if the count is 1 or greater than 1. Thanks! - John Burger MITRE
В списке pgsql-general по дате отправления: