Re: [SQL] iceberg queries

2003-02-04 Thread Christoph Haller
Does PostgreSQL optimizer handle iceberg queries well? What do you mean by iceberg query ? I've never heard this term. Regards, Christoph ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] iceberg queries

2003-02-04 Thread Wei Weng
] Sent: Tuesday, February 04, 2003 3:39 AM Subject: Re: [SQL] iceberg queries Does PostgreSQL optimizer handle iceberg queries well? What do you mean by iceberg query ? I've never heard this term. Regards, Christoph ---(end of broadcast)--- TIP 4

Re: [SQL] iceberg queries

2003-02-04 Thread Bruno Wolff III
On Tue, Feb 04, 2003 at 09:08:56 -0500, Wei Weng [EMAIL PROTECTED] wrote: It is a query that looks like SELECT target1, target2... targetn, SUN(t.qty) FROM Table t GROUP BY target1 HAVING SUM(t.qty)=10 You can replace SUM(t.qty)=10 with other aggregate constraints. There were some

Re: [SQL] iceberg queries

2003-02-04 Thread Jan Wieck
Christoph Haller wrote: Does PostgreSQL optimizer handle iceberg queries well? What do you mean by iceberg query ? I've never heard this term. Iceberg queries compute one or more aggregate functions to find aggregate values above a specified threshold. A typical iceberg query would be

Re: [SQL] iceberg queries

2003-02-04 Thread Tom Lane
Jan Wieck [EMAIL PROTECTED] writes: As to the original question, if an index is available that returns the rows in the sort order of the GROUP BY clause, PostgreSQL defaults to an index scan, otherwise it will do a sort of the rows matching an optional WHERE clause. This sorted set is then

Re: [SQL] iceberg queries

2003-02-04 Thread Jan Wieck
Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: As to the original question, if an index is available that returns the rows in the sort order of the GROUP BY clause, PostgreSQL defaults to an index scan, otherwise it will do a sort of the rows matching an optional WHERE clause. This

[SQL] iceberg queries

2003-02-03 Thread Wei Weng
Does PostgreSQL optimizer handle iceberg queries well? Thanks Wei ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]