pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Rieke <andreas.rieke@isl-online.de>
To: kb@neuematerialien.de
Subject: Performance problem
Date: Wed, 24 Jan 2001 14:57:10 +0100
Message-ID: <3A6EDF36.69CBF1AB@isl-online.de> (raw)

Hi there,

maybe anyone can help me with the following problem.
Using PostgreSQL 7.03 on a Suse 6.3 Linux (kernel 2.2.13) with a P3/550
MHz,
I get a performance problem with a select command which takes up to 10
seconds.
The following tables are involved in this command:

CREATE TABLE "property_list" (
 "number" float8,
 "level_1_de" text,
 "level_1_en" text,
 "level_2_de" text,
 "level_2_en" text,

...

);

CREATE TABLE "properties" (
 "material_oid" oid NOT NULL,
 "property_list_oid" oid NOT NULL,

...

);

CREATE TABLE "materials" (
 "user_oid" oid NOT NULL,
 "material_class" oid,
 "is_new" bool DEFAULT 't'::bool,

...

);

and the command is

SELECT DISTINCT level_1_de from property_list pl, properties p,
materials m where m.oid=p.material_oid and p.property_list_oid=pl.oid
and m.is_new=FALSE;

The command returns about 10 items.
The tables mentioned contain the following number of entries:

materials: 2476
properties: 30 323
property_list: 349


I hope that using INDEXes should speed up the search, but although I
made
several attempts, the search is too slow. Since I am not an expert on
databases and PostgreSQL, maybe somebody who had similar problems is
able to help me.
Also, I do not know whether the DISTINCT in the SELECT statement forces
the database to
use algorithms which have not been optimized yet.

Thanks in advance for your help,

kind regards,

Andreas




view thread (47+ messages)  latest in thread

Message-ID: <3A6EDF36.69CBF1AB@isl-online.de>
Permalink:  ../3A6EDF36.69CBF1AB@isl-online.de/
Also on:    postgresql.org/message-id/3A6EDF36.69CBF1AB@isl-online.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas.rieke@isl-online.de, kb@neuematerialien.de
  Subject: Re: Performance problem
  In-Reply-To: <3A6EDF36.69CBF1AB@isl-online.de>
  References: <3A6EDF36.69CBF1AB@isl-online.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox