[PERFORM] query optimization

2012-04-26 Thread Richard Kojedzinszky
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 sequenc

Re: [PERFORM] query optimization

2012-05-03 Thread Richard Kojedzinszky
szag Informatikai Zrt. On Thu, 26 Apr 2012, Tom Lane wrote: Date: Thu, 26 Apr 2012 15:17:18 -0400 From: Tom Lane To: Richard Kojedzinszky Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] query optimization Richard Kojedzinszky writes: Dear list, We have a database schema, which