RE: [GENERAL] Speed
От | Jackson, DeJuan |
---|---|
Тема | RE: [GENERAL] Speed |
Дата | |
Msg-id | D05EF808F2DFD211AE4A00105AA1B5D20DCBA0@cpsmail обсуждение исходный текст |
Список | pgsql-general |
Use Indexes... -DEJ > -----Original Message----- > From: Justin Long [SMTP:justinlong@strategicnetwork.org] > Sent: Tuesday, April 27, 1999 11:31 AM > To: pgsql-general@postgreSQL.org > Subject: [GENERAL] Speed > > I find that it is actually faster to do a SELECT from a single record set, > then fetch each individual row and do additional SELECTS to find > additional > pieces of data from other databases, rather than to a join between two or > three databases > > for example > > SELECT ctryid, dirid, notes from initiative order by postedon limit > 3; > (for each individual record in the above select)... > select name from country where country.ctryid=iRec.ctryid > select name from directory where directory.dirid=iRec.dirid > > (well this is kind of abstract code but you can follow the logic) > > Has anyone else noticed that when you do multiple joins the speed of > PGSQL6.5 goes down dramatically? This is the difference between 2 seconds > for the above and 15 for a join... Is there some way to optimize? > > > Never retreat. Never surrender. Never cut a deal with a dragon. > _______________________________________________________________ > Justin Long CIO / Site Editor > 616 Station Square Ct Network for Strategic Missions > Chesapeake, VA 23320 977 Centerville Trnpk CSB 317 > JustinLong@xc.org Va Beach, VA 23463 > Check out our site at: http://www.strategicnetwork.org >
В списке pgsql-general по дате отправления: