pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eshara Mondal <emondal@edanalytics.org>
To: Renjith Gk <renjithgk@gmail.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: RE: Performance Optimisation - Identifying the correct DB
Date: Tue, 23 Apr 2019 15:13:45 +0000
Message-ID: <BYAPR08MB589506D03D4407D3607904D2B9230@BYAPR08MB5895.namprd08.prod.outlook.com> (raw)
In-Reply-To: <CAGNT6Q5u0+JOozQAgvEbi4LMFzTdj9iLEWPAcnkPSEptn9RhpA@mail.gmail.com>
References: <CAGNT6Q5u0+JOozQAgvEbi4LMFzTdj9iLEWPAcnkPSEptn9RhpA@mail.gmail.com>

Hello,

As I understand you should not have any issues with reading 200K records in postgres.  Unless your tables are being heavily written to at the same time or over indexed (or not indexed at all), you could also check how much your tables have ‘bloated’ to see whether or not you need to run a vacuum on it.


SELECT schemaname, relname, n_live_tup, n_dead_tup, trunc(100*n_dead_tup/(n_live_tup+1))::float "ratio%",

to_char(last_autovacuum, 'YYYY-MM-DD HH24:MI:SS') as autovacuum_date,

to_char(last_autoanalyze, 'YYYY-MM-DD HH24:MI:SS') as autoanalyze_date

FROM pg_stat_all_tables

ORDER BY last_autovacuum;



This can help by showing you how many dead tuples you have laying around on your tables.  Also shows you the last time your tables were analyzed and autovacuumed by the vacuum daemon.



Hope that helps a bit,

Eshara


From: Renjith Gk <renjithgk@gmail.com>
Sent: Tuesday, April 23, 2019 9:07 AM
To: pgsql-admin@lists.postgresql.org
Subject: Performance Optimisation - Identifying the correct DB

Hello Friends,

I am seeking a better suggestion for Identifying the correct DB as part of READ operation (fetching queries).

What is the optimal execution time for Reading 200k records in Postgres. We had issues for reading records in cassandra which faced time out for ~200K records.

any ideal solution or recommendation towards Postgres.

Best regards,
Renjith


view thread (3+ messages)  latest in thread

Message-ID: <BYAPR08MB589506D03D4407D3607904D2B9230@BYAPR08MB5895.namprd08.prod.outlook.com>
Permalink:  ../BYAPR08MB589506D03D4407D3607904D2B9230@BYAPR08MB5895.namprd08.prod.outlook.com/
Also on:    postgresql.org/message-id/BYAPR08MB589506D03D4407D3607904D2B9230@BYAPR08MB5895.namprd08.prod.outlook.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-admin@postgresql.org
  Cc: emondal@edanalytics.org, renjithgk@gmail.com
  Subject: Re: Performance Optimisation - Identifying the correct DB
  In-Reply-To: <BYAPR08MB589506D03D4407D3607904D2B9230@BYAPR08MB5895.namprd08.prod.outlook.com>
  References: <CAGNT6Q5u0+JOozQAgvEbi4LMFzTdj9iLEWPAcnkPSEptn9RhpA@mail.gmail.com> <BYAPR08MB589506D03D4407D3607904D2B9230@BYAPR08MB5895.namprd08.prod.outlook.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