Hi Vik,
Thanks for your feedback, very helpful.
I modified your query slightly, this will return all vacancy templates and
all level 1 vacancies which arent templates, and does so in about
~800-900ms less, an great improvement on the original query.
SELECT Vacancy.ID,
Vacancy.JobTitle,
On Wed, Aug 12, 2015 at 3:29 PM, robbyc robcampbel...@gmail.com wrote:
Hi Venkata,
work_mem was set to 72MB, increased to 144MB, no change.
Increasing work_mem depends on various other factors like Table size
(amount of data being sorted), available memory etc.
Added an index of type
You can give it a try only on that partition just to see if your query plan
gets better. I prefer defining partitioning over ranging attributes like,
for example: cid between 123 and 456. It makes more sense, especially when
there are attributes which value strictly depends on the check attribute.
I tried to add index on partition key and it didn't help. we have
autovacuum running. The updates and inserts are very frequent on these
tables. The server kernel version is 3.5.0-22-generic. It has 376G memory.
max_connections = 2500# (change requires restart)
shared_buffers = 32GB
On 08/12/2015 04:34 AM, robbyc wrote:
Hi,
I am new to optimizing queries and i'm getting a slow running time
(~1.5secs) with the following SQL:
Before mucking about with work_mem and indexes, the first thing to do is
rewrite this query correctly. Here are just some of the things wrong
with