[pgjdbc/pgjdbc] c57414: Metadata queries improvements. (#1673)

From: bjanczak <noreply(at)github(dot)com>
To: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: [pgjdbc/pgjdbc] c57414: Metadata queries improvements. (#1673)
Date: 2020-01-20 10:34:57
Message-ID: pgjdbc/pgjdbc/push/refs/heads/master/c84e62-c57414@github.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: c574147af450fdac4a222dceef21991a67235396
https://github.com/pgjdbc/pgjdbc/commit/c574147af450fdac4a222dceef21991a67235396
Author: bjanczak <bartlomiej(dot)janczak(at)gmail(dot)com>
Date: 2020-01-20 (Mon, 20 Jan 2020)

Changed paths:
M pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java

Log Message:
-----------
Metadata queries improvements. (#1673)

* Metadata queries improvements.
When dealing with large PostrgeSQL databases of thousands of schemas, tens of thousands of tables and millions of indexes particular PgDatabaseMetaData methods have suboptimal implementation.
The pattern that was utilized in implementation used inner query on pg_catalog.pg_index in order to retrieve keys (information_schema._pg_expandarray(i.indkey) AS keys). Such implementation forced full table scan on pg_catalog.pg_index prior to filtering result set on schema and table name.
The optimization idea was to get rid of inner querry in order to let querry planner to avoid full table scan and filter out pg_catalog.pg_index rows prior to executing (information_schema._pg_expandarray(i.indkey) AS keys).

* checkstyle fixes

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2020-01-20 10:36:12 [pgjdbc/pgjdbc] 39c73a: be explicit about which JDK (#1672)
Previous Message Brett Okken 2020-01-16 16:13:26 [pgjdbc/pgjdbc] c84e62: Utf 8 encoding optimizations (#1444)