Seeing foreign key lookups in explain output
От | Vincent de Phily |
---|---|
Тема | Seeing foreign key lookups in explain output |
Дата | |
Msg-id | 3798971.mRNc5JcYXj@moltowork обсуждение исходный текст |
Ответы |
Re: Seeing foreign key lookups in explain output
|
Список | pgsql-general |
Hi list, an explain analyze wish : create table t1(id serial primary key); create table t2(id serial primary key, ref integer references t1(id) on delete cascade); ...insert many rows in both tables... explain delete from t1 where id < 10000; ... The explain output will tell me it's using the index on t1's id, but it tells me nothing about the seqscan that happens on t2 (because I forgot to add an index on t2.ref). It isn't the first time I get bitten by this, and I bet I'm not the only one. The explain tells me everything will work fast, but reallity is 100 times slower. Is there a way I can extend explain output to show the rest of the work done behind the scene ? Fixing that performance issue is easy once you see it, but most people will just look at the explain output and erroneously conclude "it's as good as it gets". -- Vincent de Phily
В списке pgsql-general по дате отправления: