zend-db icon indicating copy to clipboard operation
zend-db copied to clipboard

Use postgres-specific tables to read database schema

Open mat128 opened this issue 7 years ago • 3 comments

Fixes performance issues noted in #199.

On my production server, the original query took 22 seconds to retrieve 272 rows. This new query takes 204ms and retrieves the same rows.

This is based off @alextech query in #199 and adapted to be a drop-in replacement (it returns the correct values for check_option and is_updatable.

Closes #199

mat128 avatar Jun 13 '18 11:06 mat128

@mat128 thank for the PR, it looks very good! We need to provide a test for this change. We have a test/integration folder where we can test PostgreSQL using Travis CI, see this database test configuration. Have a look and let me know if you need assistance adding this integration test, thanks!

ezimuel avatar Aug 07 '18 13:08 ezimuel

This repository has been moved to laminas/laminas-db. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-db to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-db.
  • In your clone of laminas/laminas-db, commit the files, push to your fork, and open the new PR. We will be providing tooling via laminas/laminas-migration soon to help automate the process.

weierophinney avatar Dec 31 '19 22:12 weierophinney

This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at https://github.com/laminas/laminas-db/issues/48.

michalbundyra avatar Jan 16 '20 19:01 michalbundyra