Query running slow - Mailing list pgsql-performance

From samantha mahindrakar
Subject Query running slow
Date
Msg-id f0c828c40804161414u731aea46h35207eec1278c51c@mail.gmail.com
Whole thread Raw
Responses Re: Query running slow
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Gavin M. Roy"
Date:
Subject: Re: Anybody using the Dell Powervault MD3000 array?
Next
From: Thomas Spreng
Date:
Subject: Re: Oddly slow queries