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

Running "cl search .count" on codalab.stanford.edu times out #3787

Open
epicfaace opened this issue Sep 15, 2021 · 5 comments
Open

Running "cl search .count" on codalab.stanford.edu times out #3787

epicfaace opened this issue Sep 15, 2021 · 5 comments
Labels

Comments

@epicfaace
Copy link
Member

Running "cl search .count" on codalab.stanford.edu times out. It should instead give us the correct result.

image

@epicfaace epicfaace added p1 Do it in the next two weeks. and removed p2 Do it this quarter. labels Jan 19, 2022
@jzwang43
Copy link
Contributor

@epicfaace I was looking at the query generated by search_bundles. Looks like it's already pretty optimized. Do you know if there's any way to improve the performance if there are a lot of bundles like on Stanford cluster?

SELECT DISTINCT count(*) AS count_1 
FROM bundle 
WHERE bundle.uuid IN (SELECT bundle_metadata.bundle_uuid 
FROM bundle_metadata 
WHERE bundle_metadata.metadata_key = :metadata_key_1 AND bundle_metadata.metadata_value >= :metadata_value_1)
 LIMIT -1 OFFSET :param_1

@epicfaace
Copy link
Member Author

Some optimizations we could do:

  • we could potentially get rid of the outer query? What do param_1 and metadata_key_1 and metadata_value_1 mean?
  • add indexes for metadata_key and metadata_value in the bundle_metadata table, and an index for uuid in bundle

@epicfaace
Copy link
Member Author

maybe this will be faster

SELECT distinct bundle_uuid 
FROM bundle_metadata 
WHERE bundle_metadata.metadata_key = :metadata_key_1 AND bundle_metadata.metadata_value >= :metadata_value_1

@pranavjain
Copy link
Contributor

@jzwang43 Will start working on it next week (02/09)

@pranavjain
Copy link
Contributor

Removing this from p1.

This would require experimentation, moving to p2.

@pranavjain pranavjain added p2 Do it this quarter. and removed p1 Do it in the next two weeks. labels Feb 9, 2022
@jzwang43 jzwang43 removed their assignment Mar 7, 2022
@teetone teetone self-assigned this Sep 13, 2022
@teetone teetone removed their assignment Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants