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

Rework index column introspection on Postgres #6887

Open
wants to merge 1 commit into
base: 4.3.x
Choose a base branch
from

Conversation

morozov
Copy link
Member

@morozov morozov commented Apr 3, 2025

The current implementation has two problems:

  1. It makes N+1 queries to introspect indexes.
  2. It throws an exception from a method that's not supposed to throw one (see @phpstan-ignore).

This PR rewrites the query to fetch index columns in a similar format as we use for all other platforms (one row per index column).

Additionally, it gets rid of the subquery at the bottom. This requires to change a couple of table aliases to the values that buildQueryConditions() expects.

@morozov morozov force-pushed the postgres-index-introspection branch from 26827ad to dea062e Compare April 3, 2025 05:22
@morozov morozov added this to the 4.3.0 milestone Apr 3, 2025
@morozov morozov marked this pull request as ready for review April 3, 2025 05:38
@morozov morozov requested a review from greg0ire April 5, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant