Re: Comparing two slices within one table efficiently

Поиск
Список
Период
Сортировка
От Christian Kindler
Тема Re: Comparing two slices within one table efficiently
Дата
Msg-id 20070813193427.76840@gmx.net
обсуждение исходный текст
Ответ на Re: Comparing two slices within one table efficiently  (Andrew Kroeger <andrew@sprocks.gotdns.com>)
Ответы Re: Comparing two slices within one table efficiently  (Ken Simpson <ksimpson@mailchannels.com>)
Список pgsql-sql
Yes and you could make it even more speedy with the use table partitioning.
http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html

> select
>     t1.domain_id as domain_id,
>     t1.mta_id as mta_id,
>     t1.run_id as run_id_1,
>     t1.attribute1 as attribute1_1,
>     t1.attribute2 as attribute2_1,
>     t2.run_id as run_id_2,
>     t2.attribute1 as attribute1_2,
>     t2.attribute2 as attribute2_2
> from
>     t t1
> join t t2 on
>     t1.mta_id = t2.mta_id and
>     t1.domain_id = t2.domain_id and
>     (t1.attribute1 != t2.attribute1 or t1.attribute2 != t2.attribute2)

-- 
cu
Chris

Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


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

Предыдущее
От: "Christian Kindler"
Дата:
Сообщение: how to moce back in refcursor
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Comparing two slices within one table efficiently