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

Don't parse SQL if no tracking is in progress #18280

Merged

Conversation

kamil-tekiela
Copy link
Contributor

Surprisingly, performing an SQL query is better for performance than parsing the query unnecessarily. Tested with 250 tables for about 50% better performance.

Ref. #18249

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.83 🎉

Comparison is base (5e0caaf) 47.07% compared to head (8550db2) 47.90%.

Additional details and impacted files
@@             Coverage Diff              @@
##             QA_5_2   #18280      +/-   ##
============================================
+ Coverage     47.07%   47.90%   +0.83%     
- Complexity    16973    16975       +2     
============================================
  Files           607      607              
  Lines         72306    72316      +10     
============================================
+ Hits          34038    34644     +606     
+ Misses        38268    37672     -596     
Flag Coverage Δ
dbase-extension 47.33% <0.00%> (-0.04%) ⬇️
recode-extension 47.31% <0.00%> (-0.59%) ⬇️
unit-7.2-ubuntu-latest 47.34% <0.00%> (+0.02%) ⬆️
unit-7.3-ubuntu-latest 47.83% <0.00%> (+0.01%) ⬆️
unit-7.4-ubuntu-latest 47.77% <0.00%> (-0.06%) ⬇️
unit-8.0-ubuntu-latest 47.87% <0.00%> (-0.01%) ⬇️
unit-8.1-ubuntu-latest 49.21% <0.00%> (+1.36%) ⬆️
unit-8.2-ubuntu-latest 47.85% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
libraries/classes/Tracker.php 75.00% <0.00%> (-1.93%) ⬇️

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome !

@williamdes williamdes added this to the 5.2.2 milestone Mar 20, 2023
@liviuconcioiu
Copy link
Contributor

@kamil-tekiela Thank you for the great work! BTW, this PR will also fix the issues with import of large tables/databases.

In my case, opening a database with 250 tables (50% performance increase) and importing a table (25 MB in size and 25000 rows), before this PR it took 4 minutes and 30 seconds. Now it takes 30 seconds!

@williamdes williamdes self-assigned this Mar 21, 2023
@williamdes williamdes merged commit ac52485 into phpmyadmin:QA_5_2 Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants