Re: test / live environment, major performance difference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christo Du Preez <christo@xxxxxxxxxx> 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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux