Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltALH-0003H2-Ky for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 14:47:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltALF-0000lm-EB for pgsql-general@arkaria.postgresql.org; Tue, 15 Jun 2021 14:47:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltALF-0000ld-3C for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 14:47:01 +0000 Received: from mail1.dalibo.net ([212.83.143.11] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltALB-0004NU-TP for pgsql-general@lists.postgresql.org; Tue, 15 Jun 2021 14:47:00 +0000 Received: from firost (larco.ioguix.net [78.202.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id A486920438; Tue, 15 Jun 2021 16:46:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1623768415; bh=CBunRA1ZElto+mf+//p5UcrL5Z5XqEM3nTM1qBK0/Z8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TD44npdHakepb6nSsGafc6uo+CQuLTGJiHPnNhzwD6cdNd1uvZMWrs1/CUufm/yJP oJEC+wMqeyl+iiN+WAYWD36EbFL7XCvBXr4aJ4WeZAKnMpt5f8j2GUi7TfgwuiLjkT P0QK5LSdcDNcxKoagzVuZYBm44l3LiN/s7CrmORM= Date: Tue, 15 Jun 2021 16:46:54 +0200 From: Jehan-Guillaume de Rorthais To: Atul Kumar Cc: pgsql-general Subject: Re: query issue Message-ID: <20210615164654.18c79454@firost> In-Reply-To: References: <20210615134151.0e54b642@firost> Organization: Dalibo MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 15 Jun 2021 19:16:41 +0530 Atul Kumar wrote: > hi, > > I have an RDS instance with 2GB of RAM, 1 CPU, instance class - t2.small. > > If you need any more info please let me know. > > and as you shared I need to tweak > random_page_cost/seq_page_cost/effective_cache_size So please suggest > which parameter value I need to increase or decrease as I am known > well with these parameters. First, did you test with "SELECT _id" instead of "SELECT *" ? About rand_page_costs/effective_cache_size, the fine manual already give some explanations and tips: https://www.postgresql.org/docs/current/runtime-config-query.html With such a low setup, I'm not sure what you can expect though. What is the concurrency? How many lines in total? The table size?