Re: DISTINCT ON not working...?

Поиск
Список
Период
Сортировка
От Phillip Smith
Тема Re: DISTINCT ON not working...?
Дата
Msg-id 000e01c7553c$3319b530$9b0014ac@wbaus090
обсуждение исходный текст
Ответ на Re: DISTINCT ON not working...?  (Marcin Stępnicki <mstepnicki@gmail.com>)
Список pgsql-sql
This is a temporary table (with no indexes) that gets created in the same
transaction block as the SELECT gets run, but I tried creating an index on
the ean column anyway with no luck:

CREATE INDEX ean_idx ON TMPTABLE USING btree (ean);
SELECT  DISTINCT ON (ean)ean,count(*)
FROM    TMPTABLE
WHERE   code NOT IN (SELECT code FROM stock_deleted)AND    ean IS NOT NULL
GROUP BY ean;

Still returns:    3246576919422    2


-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Marcin Stêpnicki
Sent: Tuesday, 20 February 2007 23:34
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] DISTINCT ON not working...?

Wild guess - have you tried reindexing this table? I haven't seen
corrupted indexes since 7.1, though - it usually means subtle hardware
problems.


*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee.  If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments


В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: can someone explain confusing array indexing nomenclature
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] timestamp subtraction (was Re: formatting intervals with to_char)