query optimization

From: Richard Kojedzinszky <krichy(at)tvnetwork(dot)hu>
To: pgsql-performance(at)postgresql(dot)org
Subject: query optimization
Date: 2012-04-24 08:11:43
Message-ID: alpine.DEB.2.02.1204241008570.9591@krichy.tvnetwork.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dear list,

We have a database schema, which looks the same as the attached script.

When filling the tables with data, and skipping analyze on the table (so
pg_stats contains no records for table 'a'), the first select in the
script runs fast, but after an analyze the planner decides to sequence
scan tables b and c, thus making the query much slower. Can somebody help
me solving this issue, or tuning our installation to not to use sequence
scans in this case?

Thanks in advance,

Kojedzinszky Richard
Euronet Magyarorszag Informatikai Zrt.

Attachment Content-Type Size
test.sql application/x-sql 834 bytes

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Shaun Thomas 2012-04-24 19:32:49 Re: Configuration Recommendations
Previous Message Robert Klemme 2012-04-24 05:53:30 Re: Configuration Recommendations