Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBAL-1106 Improve schema introspection performance on Oracle #768

Conversation

deeky666
Copy link
Member

@deeky666 deeky666 commented Jan 4, 2015

This PR improves the overall schema introspection performance on Oracle by optimizing some of the getList*() method SQL queries in the platform.
Unfortunately Oracle system views are rather slow, especially when joining tables. Using subqueries can improve the execution time a lot.

Improved queries

(the times have been measured using an exemplary query from the functional test suite)

getListTableForeignKeysSQL(): Down from ~2.33s to ~0.68s per query
getListTableColumnsSQL(): Down from ~0.49s to ~0.14s per query
getListTableIndexesSQL(): Down from ~0.5s to ~0.25s per query

Overall improvement of OracleSchemaManagerTest from ~100s to ~37.5s.

I was quite impressed by the performance improvements :)

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-1106

We use Jira to track the state of pull requests and the versions they got
included in.

@Ocramius
Copy link
Member

Ocramius commented Jan 4, 2015

Looks good, but will only land in 2.6 due to the risk of regressions

Ocramius added a commit that referenced this pull request Jan 4, 2015
…tion-performance

[DBAL-1106] Improve schema introspection performance on Oracle
@Ocramius Ocramius merged commit 1b71f92 into doctrine:master Jan 4, 2015
@deeky666
Copy link
Member Author

deeky666 commented Jan 4, 2015

Thx. Did not intend to backport it either :)

@deeky666 deeky666 deleted the improve-oracle-schema-introspection-performance branch July 7, 2016 07:28
@Ocramius Ocramius added this to the 2.6 milestone Jul 22, 2017
@Ocramius Ocramius changed the title [DBAL-1106] Improve schema introspection performance on Oracle DBAL-1106 Improve schema introspection performance on Oracle Jul 22, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants