Re: UNION ALL vs INHERITANCE
| От | Tom Lane |
|---|---|
| Тема | Re: UNION ALL vs INHERITANCE |
| Дата | |
| Msg-id | 1869.1103235194@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | UNION ALL vs INHERITANCE (Adi Alurkar <adi@sf.net>) |
| Список | pgsql-performance |
Adi Alurkar <adi@sf.net> writes:
> Why does the append resulting from a inheritance take longer than one
> resulting from UNION ALL?
The index scan is where the time difference is:
> -> Index Scan using fftiallbgrgfid_1102715649 on
> f_f_all_base (cost=0.00..3.52 rows=1 width=51) (actual
> time=3.871..244.356 rows=28 loops=1)
> Index Cond: (group_id = 78745)
> Filter: (all_tidx @@ '\'mmcach\''::tsquery)
> -> Index Scan using fftiallbgrgfid_1102715649 on
> f_f_all_base (cost=0.00..3.52 rows=1 width=51) (actual
> time=3.714..79.996 rows=28 loops=1)
> Index Cond: (group_id = 78745)
> Filter: (all_tidx @@ '\'mmcach\''::tsquery)
One would have to suppose this is a caching effect, ie, the data is
already in RAM on the second try and doesn't have to be read from disk
again.
regards, tom lane
В списке pgsql-performance по дате отправления: