Hello!
I have following table:
CREATE TABLE table1 (
field1 INTEGER NOT NULL,
field2 INTEGER NOT NULL,
field3 CHARACTER(30),
... some more numeric fields)
I have also those indexes:
CREATE UNIQUE INDEX idx1 ON table1 USING btree (field3, field2, field1)
CREATE
Am Thursday, 14. August 2008 schrieb Dmitry Teslenko:
SELECT SUM(...) FROM table1 WHERE field3 = 'ABC' AND field1 1
GROUP BY field2
And planner picks up a sequential scan of a table. Why does he?
Presumably because it thinks it is the best plan, and I see no reason to doubt
that
On Thu, Aug 14, 2008 at 15:30, Peter Eisentraut [EMAIL PROTECTED] wrote:
Am Thursday, 14. August 2008 schrieb Dmitry Teslenko:
SELECT SUM(...) FROM table1 WHERE field3 = 'ABC' AND field1 1
GROUP BY field2
And planner picks up a sequential scan of a table. Why does he?
Presumably
@postgresql.org Subject: [GENERAL] Strange query plan Hello!
I have following table: CREATE TABLE table1 ( field1 INTEGER NOT NULL,
field2 INTEGER NOT NULL, field3 CHARACTER(30), ... some more numeric fields)
I have also those indexes: CREATE UNIQUE INDEX idx1 ON table1 USING btree
(field3
was fast.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Gainty
Sent: Thursday, August 14, 2008 7:57 AM
To: Dmitry Teslenko; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Strange query plan
the columns referenced in the predicate
-Original Message-
From: Dmitry Teslenko [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2008 6:57 AM
To: pgsql-general@postgresql.org
Subject: Strange query plan
Hello!
I have following table:
CREATE TABLE table1 (
field1 INTEGER NOT NULL,
field2 INTEGER NOT
On Thu, Aug 14, 2008 at 17:55, Igor Neyman [EMAIL PROTECTED] wrote:
-Original Message-
From: Dmitry Teslenko [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2008 6:57 AM
To: pgsql-general@postgresql.org
Subject: Strange query plan
Hello!
I have following table:
CREATE
On 14 août 08, at 16:28, Dmitry Teslenko wrote:
On Thu, Aug 14, 2008 at 17:55, Igor Neyman [EMAIL PROTECTED]
wrote:
-Original Message-
From: Dmitry Teslenko [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2008 6:57 AM
To: pgsql-general@postgresql.org
Subject: Strange query plan
What does explain analyze select (your query here) have to say?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Thu, Aug 14, 2008 at 18:47, Scott Marlowe [EMAIL PROTECTED] wrote:
What does explain analyze select (your query here) have to say?
Expalin analyze says it makes sequential scan on a table table1.
On Thu, Aug 14, 2008 at 18:48, Gauthier, Dave [EMAIL PROTECTED] wrote:
Try this...
Set
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dmitry Teslenko
Sent: Thursday, August 14, 2008 10:29 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Strange query plan
On Thu, Aug 14, 2008 at 17:55, Igor Neyman [EMAIL PROTECTED]
wrote:
-Original
On Thu, Aug 14, 2008 at 8:48 AM, Gauthier, Dave [EMAIL PROTECTED] wrote:
Try this...
Set default_statistics_target to be 1000 in postgres.conf then reboot
your pg server. Analyze the table. Try the query again.
A reload is enough. I think you might have to disconnect and
reconnect your
I've a table containing some sort of logs, the table layout ist:
Attribute | Type | Modifier
---+--+---
id| integer | not null default nextval('ids'::text)
serverid |
Mario Weilguni writes:
Now when I type:
explain select min(id)from log;
NOTICE: QUERY PLAN:
Aggregate (cost=45702.20..45702.20 rows=1 width=4)
- Seq Scan on log (cost=0.00..41978.36 rows=1489536 width=4)
I don't understand why the index log_pkey is not used here. I guess it would
14 matches
Mail list logo