Thread: POSTGRES TOO SLOW

POSTGRES TOO SLOW

From
"Mario Sánchez"
Date:
Hi, my name is mario sanchez, i work on a telecommunications company on the
dominican republic. I recently installed postgres 7.0.1 on a Sun server with
Solaris 5.7. It is working fine but when i try to do a join of two tables of
size, let's say 130,000 records one and the other 200,000 it just freezes
there .... and even if a wait for hours it doesn't give me an answer, and
when i press Crtl+C it breaks, like it's been working on it, but i've waited
a whole night and it hasn't finished.  I've done the same query on vfp and
finished in 2 seconds or so, .... maybe i just configured wrongly the
postgres or I don't know.  I've read all the faq and manuals i've found
about it and i cant figure out what the problem is, can you help me out with
this?

thanks,

Mario Sanchez
Telecomm. Engineer
TRICOM, DR

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: POSTGRES TOO SLOW

From
Tom Lane
Date:
"Mario S�nchez" <mrxm@hotmail.com> writes:
> I recently installed postgres 7.0.1 on a Sun server with
> Solaris 5.7. It is working fine but when i try to do a join of two tables of
> size, let's say 130,000 records one and the other 200,000 it just freezes
> there .... and even if a wait for hours it doesn't give me an answer,

Well, if it's just doing a stupid nested-loop plan then it'd have to
consider all 26 billion cross-product tuples, which might indeed take
awhile.  What's the query, *exactly*?  What does EXPLAIN say is the
query plan for it?  What indexes have you created on the tables?

            regards, tom lane