Skip site navigation (1) Skip section navigation (2)

Re: test / live environment, major performance difference

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christo Du Preez <christo(at)mecola(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: test / live environment, major performance difference
Date: 2007-06-12 16:09:46
Message-ID: 8385.1181664586@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Christo Du Preez <christo(at)mecola(dot)com> writes:
> On my laptop the explain analyze looks like this:

> "Index Scan using fki_layertype_parentid on layertype  (cost=0.00..8.27
> rows=1 width=109)"
> "  Index Cond: (parentid = 300)"

OK ...

> and on the problem server:

> "Seq Scan on layertype  (cost=0.00..20.39 rows=655 width=110)"
> "  Filter: (parentid = 300)"

The server thinks that every row of the table matches the WHERE clause.
That being the case, it's making the right choice to use a seqscan.
The question is why is the rows estimate so far off?  Have you ANALYZEd
the table lately?

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Bill MoranDate: 2007-06-12 16:25:55
Subject: Re: VACUUM vs auto-vacuum daemon
Previous:From: Alvaro HerreraDate: 2007-06-12 16:08:02
Subject: Re: VACUUM vs auto-vacuum daemon

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group