Received: from megazone.bigpanda.com ([63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB3CAim90450 for ; Mon, 3 Dec 2001 07:10:44 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 4A57DD5E6; Mon, 3 Dec 2001 04:10:47 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 400965BEA; Mon, 3 Dec 2001 04:10:47 -0800 (PST) Date: Mon, 3 Dec 2001 04:10:47 -0800 (PST) From: Stephan Szabo To: Manuel Trujillo Cc: Subject: Re: problems with postgresql speed In-Reply-To: <20011203101437.GA22573@dorna.es> Message-ID: <20011203040614.S90415-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200112/7 X-Sequence-Number: 2731 On Mon, 3 Dec 2001, Manuel Trujillo wrote: > I've serious problems with the speed of my database. > If I execute any query like this; > > SELECT d.gallery_id, e.subevent_id, d.result_type_id, > d.result_type_name, e.language_id FROM ((SELECT b.gallery_id, > b.element_id AS result_type_id, c.name AS result_type_name FROM > gallery_element b, result_type c WHERE ((c.id = b.element_id) AND > (b.element_type_id = 10))) d JOIN (SELECT b.gallery_id, b.element_id AS > subevent_id, c.language_id FROM gallery_element b, view_subevent_info c > WHERE ((c.subevent_id = b.element_id) AND (b.element_type_id = 9))) e ON > ((d.gallery_id = e.gallery_id))); > > The result take a minute, or more, to show the results. > The postgresql.conf I used is attached to this e-mail. > The table "gallery_element" have 8644 rows, and it have got 25932 > registers. > The machine has 512 Mb RAM and 1.4 PIV processor. Have you run vacuum analyze recently on the database? Can you send the schema for the tables/views involved and the explain output?