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

Support postgres #13

Merged
merged 61 commits into from
Apr 11, 2021
Merged

Support postgres #13

merged 61 commits into from
Apr 11, 2021

Conversation

fabioperrella
Copy link
Contributor

@fabioperrella fabioperrella commented Apr 7, 2021

related to #3
closes #11

This PR:

  • adds support for PostgreSQL (unfortunately all results are uncertain)
  • adds support for Ruby >= 2.5 and Activerecord >= 4
  • sorts lines in the HTML report by certainity_level, identifier, query
  • improves the query analyser to not analyse a query again if a similar query was analysed before with a prepared statement (Postgres use prepared statements as default)
  • improves the logic to detect if a query was fired from a test file or not
  • removes the auto require for the module TestHelpers

@fabioperrella fabioperrella self-assigned this Apr 7, 2021
@fabioperrella fabioperrella marked this pull request as ready for review April 7, 2021 20:09
@fabioperrella
Copy link
Contributor Author

@julik @lorenzograndi4 sorry I know this PR is huge!

If you could just take a quick look, I would appreciate it!

Copy link

@julik julik left a comment

Choose a reason for hiding this comment

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

Diagonal scan looks good 😆

Could it be an idea to try to install a "representative dataset" for testing the gem? For example using a fuller list of Brazilian municipalities + a longer list of people names, say generated with Faker. I suspect it is really dependent on the table size, both for MySQL and PostgerSQL, what the query planner will plan.

@fabioperrella
Copy link
Contributor Author

fabioperrella commented Apr 9, 2021

Diagonal scan looks good 😆

Could it be an idea to try to install a "representative dataset" for testing the gem? For example using a fuller list of Brazilian municipalities + a longer list of people names, say generated with Faker. I suspect it is really dependent on the table size, both for MySQL and PostgerSQL, what the query planner will plan.

thank you!

Indeed, I also think that the results would be better if using more data, but this will not be the case when it analyses queries running on unit tests, for example.

I will create an issue with that, maybe an idea could be born influenced by that!

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.

Support for Postgres
2 participants