GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add search parameters to `EXPLAIN (SETTINGS)` by ankane · Pull Request #697 · pgvector/pgvector

Conversation

@ankane

@ankane ankane commented Oct 22, 2024

Copy link
Copy Markdown
Member

Wanted to get feedback on this, which adds search parameters with non-default values to EXPLAIN (SETTINGS).

EXPLAIN (SETTINGS) SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
                                       QUERY PLAN                                        
-----------------------------------------------------------------------------------------
 Limit  (cost=8.02..12.04 rows=2 width=48)
   ->  Index Scan using items_embedding_idx on items  (cost=8.02..12.04 rows=2 width=48)
         Order By: (embedding <-> '[3,1,2]'::vector)
 Settings: hnsw.iterative_search = 'relaxed_order'

This seems useful for debugging, but the downside is it'll appear for all queries, not just ones that consider an approximate index.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jkatz and mchristofides reacted with laugh emoji cho-thinkfree-com, yihong0618, mchristofides, rsomani95, gwenshap, kinghuang, and franchb reacted with heart emoji
All reactions
  • 😄 2 reactions
  • ❤️ 7 reactions
@jkatz

jkatz commented Oct 23, 2024

Copy link
Copy Markdown
Contributor

Awesome. I think even for the cases it doesn't use the index, it could be helpful to know the parameter setting, as that could ultimately involve tweaking the parameter / indexing strategy.

yihong0618 and KraiyosW reacted with eyes emoji
All reactions
  • 👀 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ankane
Added search parameters to EXPLAIN [skip ci]
fc0d3e7
@ankane
ankane force-pushed the guc-explain branch from 31bdf95 to fc0d3e7 Compare October 28, 2024 08:21
sagitrs
sagitrs suggested changes Jun 14, 2026
View reviewed changes

@sagitrs sagitrs left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ankane ankane mentioned this pull request Nov 11, 2026
Added search parameters to EXPLAIN settings #1060
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@sagitrs sagitrs sagitrs requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ankane @jkatz @sagitrs
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.