Speed

From: "Justin Long" <justinlong(at)strategicnetwork(dot)org>
To: <pgsql-general(at)postgreSQL(dot)org>
Subject: Speed
Date: 1999-04-27 16:30:34
Message-ID: 000501be90cb$4619a840$0a411a9f@cbn.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)xc(dot)org Va Beach, VA 23463
Check out our site at: http://www.strategicnetwork.org

Browse pgsql-general by date

  From Date Subject
Next Message Dustin Sallings 1999-04-27 17:21:35 Re: [GENERAL] advice on buying sun hardware to run postgres
Previous Message Tatsuo Ishii 1999-04-27 15:02:45 Re: [HACKERS] Re: [GENERAL] unknown symbol 'lo_unlink'