Project

General

Profile

« Previous | Next » 

Revision 12516

bugfix: *.sql: public.source_by_shortname(): need to wrap it in a nested SELECT because Postgres incorrectly does not constant-fold (inline) it, leading to a slowdown when it is therefore run many times. this is done using the steps at wiki.vegpath.org/Postgres_queries#wrap-function-call-in-nested-SELECT .

View differences:

postprocess.sql
25 25
SELECT DISTINCT dataprovider
26 26
FROM sourcelist
27 27
JOIN provider_count ON provider_count.dataprovider = sourcelist.name
28
WHERE source_id = source_by_shortname('REMIB')
28
WHERE source_id = (SELECT source_by_shortname('REMIB'))
29 29
ORDER BY dataprovider
30 30
*/
31 31
;

Also available in: Unified diff