From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-performance@postgresql.org
Subject: Re: Query Optimization
Date: Thu, 8 Apr 2010 16:03:29 +0200
Message-ID: <20100408140329.GD29013@a-kretschmer.de> (raw)
In-Reply-To: <4BBDD2F3.7030701@digsys.bg>
References: <4BBDD2F3.7030701@digsys.bg>
In response to Kaloyan Iliev Iliev :
> Hi,
> Can anyone suggest why this query so slow.
> -> Index Scan using
> ms_commands_history_ms_device_id_idx on ms_commands_history ch
> (cost=0.00..4.33 rows=1 width=8) (actual time=0.163..25254.004 rows=9807
> loops=1)
Estimated rows: 1, actual rows: 9807, that's a BIG difference and,
maybe, your problem.
Btw.: your explain is hard to read (line-wrapping). It's better to
attach the explain as an own file...
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andreas.kretschmer@schollglas.com
Subject: Re: Query Optimization
In-Reply-To: <20100408140329.GD29013@a-kretschmer.de>
* 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