Re: [SQL] Joining bug????
От | David Hartwig |
---|---|
Тема | Re: [SQL] Joining bug???? |
Дата | |
Msg-id | 3635F3DA.F84CA6DB@insightdist.com обсуждение исходный текст |
Ответ на | Joining bug???? (pierre <pierre@desertmoon.com>) |
Ответы |
Re: [SQL] Joining bug????
|
Список | pgsql-sql |
pierre wrote: > I've been attempting to get my DB tuned to handle joins as best as > possible. However, no matter which way I try to perform the joins, if I > attempt to join more than two or three tables the joins becomes > unbearably long not matter how many indexes I create in however many ways. > > My only solution was to create a hybrid table that contains the join of > all of the tables I'm searching on with multi-keyed indexes. This is a > VERY kludgy solution that makes changing the keys to my DB hard to change. > > IS there a problem with postgresql in performing joins? Is there a fix? > What gives? There are many reasons for a query to take more time than expected. PostgreSQL can do reasonably well joining many tables. It is impossible for anyone to even guess without more specifics. Try submitting the specific query and the result of an EXPLAIN. Example: EXPLAIN SELECT foo FROM bar; Table sizes, indices, and time elapsed are also helpful. BTW, in case you don't know, the "VACUUM ANALYZE" statement need to be run occasionally to facilitate the query planner.
В списке pgsql-sql по дате отправления: