Re: COALESCE implementation question

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Re: COALESCE implementation question
Дата
Msg-id 3.0.5.32.20000805172250.01f18720@mail.rhyme.com.au
обсуждение исходный текст
Ответ на COALESCE implementation question  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: COALESCE implementation question
Re: COALESCE implementation question
Список pgsql-hackers
P.S. What's worse, I should have mentioned that the plan *with* indexes
seems flawed:

Create Table t1(f1 int);
Create Table t1(f1 int, f2 int);
Create Unique Index t2f1 on t2(f1);
Create Unique Index t2f2 on t2(f2);

explain update t1 set f1 = Coalesce( (select f2 from t2 x where x.f1 =
t1.f1), t1.f1);
NOTICE:  QUERY PLAN:

Seq Scan on t1  (cost=0.00..20.00 rows=1000 width=10) SubPlan   ->  Index Scan using t2f1 on t2 x  (cost=0.00..8.14
rows=10width=4)   ->  Seq Scan on t2 x  (cost=0.00..22.50 rows=1000 width=4)
 



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


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

Предыдущее
От: Philip Warner
Дата:
Сообщение: COALESCE implementation question
Следующее
От: Philip Warner
Дата:
Сообщение: Re: COALESCE implementation question