-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Reflect index's column operator class on PostgreSQL #12504
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
Conversation
Have yet to look, but it looks good. Are there noticeable performances differences? |
On main, commit d0bc9b2:
On this branch:
|
I'll look if it's possible to improve the time of the single getindex a bit, but overall it seems mostly ok |
@CaselIT, is the performa 8000 nce impact really a (blocking) issue for this changeset? If so, I can take a look at how to improve this. Otherwise, perhaps we can move forwards and possibly improve the situation later if someone complains? (I'd like to avoid keeping this open for too long. Thank you.) |
Sorry this got sidelined. I'll try looking at it this week |
Rebased and adjusted added test case so that it passes with PostgreSQL 9.6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is sqla-tester setting up my work on behalf of CaselIT to try to get revision 0d65907 of this pull request into gerrit so we can run tests and reviews and stuff
New Gerrit review created for change 0d65907: https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5897 |
Fill the `postgresql_ops` key of PostgreSQL's `dialect_options` returned by get_multi_indexes() with a mapping from column names to the operator class, if it's not the default for respective data type. As we need to join on ``pg_catalog.pg_opclass``, the table definition is added to ``postgresql.pg_catalog``. Fixes sqlalchemy#8664.
Hm, the last changes in tests were wrong. Pushed a fix here, sorry for the trouble. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is sqla-tester setting up my work on behalf of CaselIT to try to get revision 8fdf93e of this pull request into gerrit so we can run tests and reviews and stuff
Patchset 8fdf93e added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5897 |
@zzzeek I'm wondering if it could make sense to try and simplify a bit the query to cache the values of pg_am (what we already joined) and pg_opclass (that's joined now) since I believe that those values are ~ static and quite limited in number, so we could load them once per dialect / connection and keep it saved. https://www.postgresql.org/docs/current/catalog-pg-am.html |
doing some quick test looks interesting, but it would be follow on change, since the performance impact of this pr is limited. |
done here https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5899 seems easy enough and it should improve performance a bit on average |
Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5897 has been merged. Congratulations! :) |
Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5898 has been merged. Congratulations! :) |
Fill the `postgresql_ops` key of PostgreSQL's `dialect_options` returned by get_multi_indexes() with a mapping from column names to the operator class, if it's not the default for respective data type. As we need to join on ``pg_catalog.pg_opclass``, the table definition is added to ``postgresql.pg_catalog``. Fixes #8664. Closes: #12504 Pull-request: #12504 Pull-request-sha: 8fdf93e Change-Id: I8789c1e9d15f8cc9a7205f492ec730570f19bbcc (cherry picked from commit 0642541)
Fill the
postgresql_ops
key of PostgreSQL'sdialect_options
returned by get_multi_indexes() with a mapping from column names to the operator class, if it's not the default for respective data type.As we need to join on
pg_catalog.pg_opclass
, the table definition is added topostgresql.pg_catalog
.Fixes #8664.