pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] ad8232: Metadata queries improvment (#1694)
2+ messages / 1 participants
[nested] [flat]

* [pgjdbc/pgjdbc] ad8232: Metadata queries improvment (#1694)
@ 2020-02-04 10:57 bjanczak <noreply@github.com>
  0 siblings, 0 replies; 2+ messages in thread

From: bjanczak @ 2020-02-04 10:57 UTC (permalink / raw)
  To: pgsql-jdbc@lists.postgresql.org

  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: ad8232d7e320f7ffc43dd13d8c933e134396396d
      https://github.com/pgjdbc/pgjdbc/commit/ad8232d7e320f7ffc43dd13d8c933e134396396d
  Author: bjanczak <bartlomiej.janczak@gmail.com>
  Date:   2020-02-04 (Tue, 04 Feb 2020)

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

  Log Message:
  -----------
  Metadata queries improvment (#1694)

* 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).

* Add test for column order.







^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* [pgjdbc/pgjdbc] ad8232: Metadata queries improvment (#1694)
@ 2020-02-05 12:52 bjanczak <noreply@github.com>
  0 siblings, 0 replies; 2+ messages in thread

From: bjanczak @ 2020-02-05 12:52 UTC (permalink / raw)
  To: pgsql-jdbc@lists.postgresql.org

  Branch: refs/heads/release/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: ad8232d7e320f7ffc43dd13d8c933e134396396d
      https://github.com/pgjdbc/pgjdbc/commit/ad8232d7e320f7ffc43dd13d8c933e134396396d
  Author: bjanczak <bartlomiej.janczak@gmail.com>
  Date:   2020-02-04 (Tue, 04 Feb 2020)

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

  Log Message:
  -----------
  Metadata queries improvment (#1694)

* 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).

* Add test for column order.







^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-02-05 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 10:57 [pgjdbc/pgjdbc] ad8232: Metadata queries improvment (#1694) bjanczak <noreply@github.com>
2020-02-05 12:52 [pgjdbc/pgjdbc] ad8232: Metadata queries improvment (#1694) bjanczak <noreply@github.com>

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