Except operation

Поиск
Список
Период
Сортировка
От Satyajeet Seth
Тема Except operation
Дата
Msg-id Pine.LNX.4.10.9912020021060.3476-100000@vibhas.cse.iitd.ernet.in
обсуждение исходный текст
Список pgsql-general
Hi
The query:
select * from webdata except select * from webdata1;
 takes abysmally long .How can I optimise it?
The particulars are:

tracedb=> \d webdata
Table    = webdata
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-------+
| tid                              | int4                             |
4 |
| itemid                           | int4                             |
4 |
| ordering                         | int4                             |
4 |
+----------------------------------+----------------------------------+-------+

tracedb=> \d webdata1
Table    = webdata1
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-------+
| tid                              | int4                             |
4 |
| itemid                           | int4                             |
4 |
| ordering                         | int4                             |
4 |
+----------------------------------+----------------------------------+-------+
tracedb=> select count(*) from webdata;
count
-----
91155
(1 row)

tracedb=> select count(*) from webdata1;
count
-----
 9550
(1 row)

Regards
Satya





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

Предыдущее
От: Ed Loehr
Дата:
Сообщение: Re: [GENERAL] "FATAL 1: my bits moved right off the end of theworld!"
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Date & Time