pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pierre@desertmoon.com
To: juris@rfb.lv
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] performance problems of a complex query with 2 subselects
Date: Fri, 5 Feb 1999 09:22:58 -0700 (MST)
Message-ID: <19990205162258.18987.qmail@desertmoon.com> (raw)
In-Reply-To: <36BB1581.555A2364@rfb.lv>

> 
> 			Hello!
> 
> I am quite new to PostgreSQL and was hoping to use it as an alternative
> to MS Access for the product catalog software I am developing (the data
> is represented in a meta-model).
> 
> I fully recreated the environment I had on MS Access (see attachment)
> and tried to run the query.
> 
> The execution time for this query on MS Access for 40000 records was
> approx. 10 seconds. 
> First the pgsql query on 400 records just seemed to hang. I installed a
> newer version of pgsql (6.4.2), created indices on the columns
> used until 'explain' showed only 1 'seq search' (couldn't get rid of
> that one). 

You need to 'vacuum analyze <table>' for each table that you have created
AFTER you've created the indexes for them before the sql optimizer will
use the indexes. This should solve most of your speed issues. I also believe
that this is in the FAQ.

-=pierre



view thread (3+ messages)  latest in thread

Message-ID: <19990205162258.18987.qmail@desertmoon.com>
Permalink:  ../19990205162258.18987.qmail@desertmoon.com/
Also on:    postgresql.org/message-id/19990205162258.18987.qmail@desertmoon.com

 · 

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-sql@postgresql.org
  Cc: pierre@desertmoon.com, juris@rfb.lv
  Subject: Re: [SQL] performance problems of a complex query with 2 subselects
  In-Reply-To: <19990205162258.18987.qmail@desertmoon.com>
  References: <36BB1581.555A2364@rfb.lv> <19990205162258.18987.qmail@desertmoon.com>

* 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