Hi,
I'm no expert on this but I think that some cases can be work around using
foo updates instead of selects. See threads "LOCK TABLE oddness in PLpgSQL
function called via JDBC" and "SetQuerySnapshot, once again" in the
archives.
But I think there is no general work around using only plpgsql. I'
hi,
could it be that "order by col1, col2 desc" is different from "order by
col1 desc, col2 desc" ? these are different and it's correct.
i'm not sure if this is your problem since i haven't digged into it...
sorry... but check it to be sure...
hth,
kuba
On Fri, 13 Dec 2002, Harald Krake wro
hi,
the where clause is evaluated before the distinct clause, so your queries
aren't equivalent because you switched the order by splitting the query
into two queries... so to obtain same results do create table as select
... where category_id=781 and then select distinct on () ...
hth,
kuba
hi,
avoid subselect: create a temp table and use join...
CREATE TEMP TABLE tmp AS
SELECT
lineitem.orderkey
FROM
lineitem
WHERE
lineitem.orderkey=orders.orderkey
GROUP BY
lineitem.orderkey HAVING
sum(lineitem.quantity)>300;
CREATE INDEX tmp_idx ON tmp (orderkey);
hi,
avoid subselect: create a temp table and use join...
CREATE TEMP TABLE tmp AS
SELECT
lineitem.orderkey
FROM
lineitem
WHERE
lineitem.orderkey=orders.orderkey
GROUP BY
lineitem.orderkey HAVING
sum(lineitem.quantity)>300;
CREATE INDEX tmp_idx ON tmp (orderkey);