Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Conversation

@RoderickJDunn
Copy link
Contributor

@RoderickJDunn RoderickJDunn commented Feb 14, 2023

Add support for passing optimizer_hints to sqeleton through the Python API.

This depends on sqeleton PR #19

Unittests passed after updating the toml file temporarily to point to the above sqeleton branch as follows:

[tool.poetry.dependencies]
...
sqeleton = { git = "https://github.com/roderickjdunn/sqeleton.git", rev = "7457caa" }
...

Copy link
Contributor

@erezsh erezsh left a comment

Choose a reason for hiding this comment

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

Maybe you should be changing make_select() instead?

@RoderickJDunn
Copy link
Contributor Author

You mean so the optimizer hints are used for other SELECT's as well? I added the hint args where I did because the min/max key and checksum SELECT's seem to be by far the slowest queries. didn't think optimizer hints were necessary for get_values since its generally quick. Are there other queries I'm missing?

@erezsh
Copy link
Contributor

erezsh commented Feb 14, 2023

The question is would it do any harm in the rest of the selects? If not, better to have it than not, right?

And this way, if new selects are added, it will be included there too (As long as they use make_select()).

But I don't have a lot of experience with optimizer hints, so maybe my thinking is wrong on this one! Let me know what you think.

@RoderickJDunn
Copy link
Contributor Author

RoderickJDunn commented Feb 19, 2023

I think it could.. if the hint is a FULL(table) hint in Oracle for example, it would force a full-table scan for all select's, even if it's more efficient to use an index-scan on most queries. Maybe the solution is to allow defining separate hints for each query type, but I don't want to complicate the options too much so what do you think?

query_key_range_hints: ....
query_checksum_hints:: ....

@dlawin
Copy link
Contributor

dlawin commented Jun 8, 2023

Same thing here 😂 #414 (comment)

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.

4 participants