Re: [PERFORM] Slow query in trigger function

2015-11-03 Thread Guido Niewerth
like the execution planer does not choose the optimal strategy. Even small changes in the function body make the execution planer use the slow sequential scan. Guido Niewerth 25 years inspired synergy OCS Optical Control Systems GmbH Wullener Feld 24 58454 Witten Germany Tel: +49 (0) 2302 95

Re: [PERFORM] Slow query in trigger function

2015-11-02 Thread Guido Niewerth
rows=1 width=0) (actual time=0.043..0.043 rows=0 loops=1) Output: 1 Index Cond: (custom_data.key = 'key-1'::text) Buffers: shared hit=6 Guido Niewerth 25 years inspired synergy OCS Optical Control System

[PERFORM] Slow query in trigger function

2015-11-02 Thread Guido Niewerth
huge runtime difference between the select query used in the trigger function and the one run from the SQL editor. Guido Niewerth 25 years inspired synergy OCS Optical Control Systems GmbH Wullener Feld 24 58454 Witten Germany Tel: +49 (0) 2302 95622-0 Fax: +49 (0) 2302 95622-33 Email: gniewe...@oc