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

fix postgresql string property index #195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tarilabs
Copy link
Contributor

@tarilabs tarilabs commented Mar 3, 2024

See #194

Proposed solution(s)

Taking MLMD's Context string property as example,

S1. modify PostgreSQL index to be ~like:

CREATE INDEX idx_context_property_string_gist ON public.contextproperty USING gist (name gist_trgm_ops, string_value gist_trgm_ops);

or derivatives. (requires first CREATE EXTENSION pg_trgm;)

S2. modify PostgreSQL index to be ~like:

CREATE INDEX idx_context_property_string ON public.contextproperty USING btree (name, is_custom_property, "substring"(string_value, 1, 255));

making it similar to MySQL behaviour, less ideal because would only be partially helpful on queries longer term.

(S3. a third solution would be to drop the idx_..._property_string indexes altogether which seems to be causing the issue, but I don't think is worth considering).

This PR

The scope of this PR is to demonstrate S1 in practice,
or discuss alternative approaches.

/cc @XinranTang could you kindly consult with the team and feedback on this, please?

@tarilabs
Copy link
Contributor Author

@XinranTang could you kindly take a look, please?

@tarilabs
Copy link
Contributor Author

@chensun was this possibly been looked into during last summer of code, also ref kubeflow/pipelines#7512 ; thank you in advance for your feedback

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.

1 participant