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

Push down quals more efficiently #26

Open
davidfetter opened this issue Dec 16, 2018 · 3 comments
Open

Push down quals more efficiently #26

davidfetter opened this issue Dec 16, 2018 · 3 comments

Comments

@davidfetter
Copy link
Contributor

There's got to be something libgit2 could do that's faster than this:

# EXPLAIN ANALYZE SELECT commit_date FROM master.master_repository WHERE sha1 = '7fee252f6fbf78ca5e50ee591573d59f98e75d37';
                                                          QUERY PLAN                                                          
══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
 Foreign Scan on master_repository  (cost=0.00..46668.15 rows=46092 width=8) (actual time=487.647..271489.852 rows=1 loops=1)
   Filter: (sha1 = '7fee252f6fbf78ca5e50ee591573d59f98e75d37'::text)
   Rows Removed by Filter: 46090
   Foreign Git Repository: /home/shackle/pggit/postgresql
   Foreign Git Branch: refs/heads/master
   Foreign Git Search Path: 
 Planning Time: 1522.944 ms
 Execution Time: 271498.346 ms
(8 rows)

Time: 273022.134 ms (04:33.022)

It's from the PostgreSQL repository.

@franckverrot
Copy link
Owner

This is bad. I'll take a look, thanks for reporting again!

@franckverrot
Copy link
Owner

Btw, I started working on that but being unfamiliar with PG's internals I couldn't get it done by the end of last year, and then moved on other things.

@davidfetter
Copy link
Contributor Author

I suspect it's libgit2's APIs that are in play here. For example, there are ways to do range queries in it that just need to be surfaced to the FDW API.

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

No branches or pull requests

2 participants