Re: Equivalent of InternalRowsAffected in NonExecuteQuery for PostgreSQL - Mailing list pgsql-sql

From Vijaykumar Jain
Subject Re: Equivalent of InternalRowsAffected in NonExecuteQuery for PostgreSQL
Date
Msg-id CAM+6J97VykBs616Wptw6E+Y9O+S_usi9k-9GeNsqr5oXJ=0r_A@mail.gmail.com
Whole thread Raw
In response to RE: Equivalent of InternalRowsAffected in NonExecuteQuery for PostgreSQL  (Avadhut Narayan Joshi <AJoshi7@sensiaglobal.com>)
Responses Re: Equivalent of InternalRowsAffected in NonExecuteQuery for PostgreSQL  (Steve Midgley <science@misuse.org>)
List pgsql-sql


On Thu, Jul 29, 2021, 6:01 PM Avadhut Narayan Joshi <AJoshi7@sensiaglobal.com> wrote:

Hello Vijaykumar ,

 

For SQL Server , when we execute queries using ExecuteNonQuery , InternalRowsAffected is set by default .

Using diagnostics we have to collect and  return explicitly for further work flow .

 

So is there any out-of-box equivalent in PostgreSQL 


OK, honestly I do not know much about sql server.
You can run explain, on the query to get an estimated rows that would be touched at each node layer.
explain analyze, would give estimated and real number of rows touched at each node layer.
There are stats updated in pg_stat_all_tables catalog for the relevant table for ins, upd, del etc but that is cumulative at the db layer, not sure if that can be useful at per query layer.
I think in that case, someone else would  chime in with more exp.

 

 

pgsql-sql by date:

Previous
From: Avadhut Narayan Joshi
Date:
Subject: RE: Equivalent of InternalRowsAffected in NonExecuteQuery for PostgreSQL
Next
From: Steve Midgley
Date:
Subject: Re: Equivalent of InternalRowsAffected in NonExecuteQuery for PostgreSQL