-
Notifications
You must be signed in to change notification settings - Fork 57
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 a filter hits all tables, instead of just one #56
Comments
@teddyward I ran into a similar issue recently and updated the docs around this here: https://architect.readthedocs.io/features/partition/postgresql.html#performance #55 should provide some more information, but basically a simple (note I'm not the project's maintainer) For the long term, I'd like to add a feature to architect that would allow for unique partitioning that would create simple check constraints such as |
Huh, thank you!!! This tip probably just reduced the runtime of my full script by about 29 days (99% or so). I was able to achieve that through Django by adding the following to my filter clause:
|
Hi! Thank you for making this library. I am really happy that someone has done this. I am having trouble getting it to work as-expected, though (maybe related to #34 ?)
I have annotated a model as follows. This works rather nicely to shuttle incoming data into different tables:
I then query it as follows:
I would expect this query to only try to hit the table
distribution_parcel_15
, but when I didn't see any performance improvement post-adding-partitions, I ranexplain()
on the above, and saw that every child table was being hit.and
EXPLAIN SELECT COUNT(*) FROM distribution_parcel WHERE state='15';
gives:Am I fundamentally misunderstanding partitions, or what?
The text was updated successfully, but these errors were encountered: