Re: [PERFORM] How to avoid seq scans for joins between union-all views (test case included)

2011-05-13 Thread Fredrik Widlert
Hi Denis and Cédric Thanks for your answers. > Fredrick, What indexes Oracle did choose ? (index-only scan ?) Oracle chooses a plan which looks like this: SELECT STATEMENT Optimizer=ALL_ROWS (Cost=5 Card=7 Bytes=182) VIEW OF 'CONNECTIONS_V' (VIEW) (Cost=5 Card=7 Bytes=182) UNION-ALL

[PERFORM] How to avoid seq scans for joins between union-all views (test case included)

2011-05-13 Thread Fredrik Widlert
Hi everyone We have recently started to port an application from Oracle to PostgreSQL. So far, we are amazed with how great most things work. However, we have run into performance problems in one type of query which is quite common in our application. We have created a (simplified) reproducible t