Re: Suggestion to improve query performance of data validation in proc. - Mailing list pgsql-general

From Michael Lewis
Subject Re: Suggestion to improve query performance of data validation in proc.
Date
Msg-id CAHOFxGpchYLK0H0kNFQT1pfqk3oyMhEWNCaPsne5nzXLi4QJCQ@mail.gmail.com
Whole thread Raw
In response to Re: Suggestion to improve query performance of data validation in proc.  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
On Fri, May 22, 2020 at 2:09 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Friday, May 22, 2020, postgann2020 s <postgann2020@gmail.com> wrote:
 

We are looking for a better query than "SELECT 1  FROM schema.table_name WHERE column1=structure_id1" this query for data validation.

 If many rows match potentially, then wrapping the query with select exists(old_query) would allow the execution to bail asap.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Query returns no rows in pg_basebackup cluster
Next
From: Michael Lewis
Date:
Subject: Re: Inaccurate (sometimes wildly so) row estimates for simple join