pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James(王旭) <wangxu@gu360.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?
Date: Wed, 20 Nov 2019 15:56:05 +0800
Message-ID: <tencent_3E7AB8853A9009844041E40C@qq.com> (raw)

Hello,


I am doing a query to fetch about 10000000 records in one time. But the query seems very slow, like "mission impossible".
I am very confident that these records should be fit into my&nbsp;shared_buffers settings(20G), and my query is totally on my index, which is this big:(19M x 100 partitions), this index size can also be put into shared_buffers easily.(actually I even made a new partial index which is smaller and delete the bigger old index)


This kind of situation makes me very disappointed.How can I make my queries much faster if my data grows more than 10000000 in one partition? I am using pg11.6.


Many thanks,
James

view thread (8+ messages)  latest in thread

Message-ID: <tencent_3E7AB8853A9009844041E40C@qq.com>
Permalink:  ../tencent_3E7AB8853A9009844041E40C@qq.com/
Also on:    postgresql.org/message-id/tencent_3E7AB8853A9009844041E40C@qq.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: wangxu@gu360.com
  Subject: Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?
  In-Reply-To: <tencent_3E7AB8853A9009844041E40C@qq.com>
  References: <tencent_3E7AB8853A9009844041E40C@qq.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox