Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

PostgresqlMetadata works very-very slowly #199

@Sohorev

Description

@Sohorev

in the class Zend\Db\Metadata\Source\PostgresqlMetadata method loadTableNameData works very slowly.
It generate query:

SELECT "t"."table_name", "t"."table_type", "v"."view_definition", "v"."check_option", "v"."is_updatable" 
FROM "information_schema"."tables" t 
LEFT JOIN "information_schema"."views" v ON "t"."table_schema" = "v"."table_schema" AND "t"."table_name" = "v"."table_name" 
WHERE "t"."table_type" IN ('BASE TABLE', 'VIEW') AND "t"."table_schema" = 'public'

query result: 438 rows 2160 ms!
Why make a selection from the database all the tables when we need all the data on a single table?
Perhaps you need to cache?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions