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
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(at)xc(dot)org Va Beach, VA 23463
Check out our site at: http://www.strategicnetwork.org
pgsql-general by date
|Next:||From: Dustin Sallings||Date: 1999-04-27 17:21:35|
|Subject: Re: [GENERAL] advice on buying sun hardware to run postgres|
|Previous:||From: Tatsuo Ishii||Date: 1999-04-27 15:02:45|
|Subject: Re: [HACKERS] Re: [GENERAL] unknown symbol 'lo_unlink' |