"could not devise a query plan for the given query"

From: "Greg Stark" <stark(at)enterprisedb(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: "could not devise a query plan for the given query"
Date: 2008-11-28 18:00:19
Message-ID: 4136ffa0811281000j7828ebebv604487e30c2c072f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm trying to actually run the experiments Tom suggested running EXPLAIN on
the DBT3 DSS queries for various default_stats_target sizes. It's a bit of a
headache because DBT3 seems to be unmaintained these days so lots of things
don't really work.

I ran into an error I've never seen before:

ERROR: XX000: could not devise a query plan for the given query
LOCATION: set_cheapest, pathnode.c:191

I haven't tried to figure out what's going on yet.

The schema is attached and the query which triggers the error is:

explain select
s_name,
count(*) as numwait
from
supplier,
lineitem l1,
orders,
nation
where
s_suppkey = l1.l_suppkey
and o_orderkey = l1.l_orderkey
and o_orderstatus = 'F'
and l1.l_receiptdate > l1.l_commitdate
and exists (
select
*
from
lineitem l2
where
l2.l_orderkey = l1.l_orderkey
and l2.l_suppkey <> l1.l_suppkey
)
and not exists (
select
*
from
lineitem l3
where
l3.l_orderkey = l1.l_orderkey
and l3.l_suppkey <> l1.l_suppkey
and l3.l_receiptdate > l3.l_commitdate
)
and s_nationkey = n_nationkey
and n_name = 'IRAQ'
group by
s_name
order by
numwait desc,
s_name;

--
greg

Attachment Content-Type Size
schema.dump application/octet-stream 7.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-28 18:00:33 Re: A bug with ALTER TABLE SET WITHOUT OIDS in CVS HEAD
Previous Message Tom Lane 2008-11-28 17:45:37 Re: Review: Hot standby