Hi.... Iam finding the following query is working a bit slow: EXECUTE '(SELECT ARRAY(SELECT DISTINCT date_part(''day'', measurement_start) FROM ' || gettablestring(dates)|| ' WHERE lane_id IN (' || lanesidarr || ')))' INTO temparr;
This function is trying to find all the days in a prticular month whihc has data for the particular lane and put it in an array...which can be used later. gettablestring(dates) returns the partition name from which the data needs to be extracted. These partitions have index on the measurement_start field. lanesidarr is a lane number. The partition has an index on this field to. Could anyone give me some hints???/ Thanks Sam -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance