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

Consider using table partitioning #132

Closed
telezhnaya opened this issue Jul 5, 2021 · 1 comment
Closed

Consider using table partitioning #132

telezhnaya opened this issue Jul 5, 2021 · 1 comment
Assignees

Comments

@telezhnaya
Copy link
Contributor

telezhnaya commented Jul 5, 2021

The amount of data grows non-linearly.
account_changes table (sorry, that's my favorite one) had 4.5M lines on Jan 1, 2021 (half a year from the genesis, or 2.5 months from enabling transfers).
Now we are collecting 5M lines in one week (Jun 28 - Jul 5).
It's 49M lines there, and the number grows faster and faster.

I think it's better not to wait for the apocalypse and set up table partitioning.
https://www.postgresql.org/docs/10/ddl-partitioning.html
The doc says a rule of thumb is that the size of the table should exceed the physical memory of the database server.
Could someone please provide the RAM size of our server?

Even without the size of RAM, I want to nominate to partitioning most of our tables: account_changes (49M), action_receipt_actions (29M), action_receipts (28M), blocks (32M), chunks (32M), execution_outcome_receipts (17M), execution_outcomes (28M), receipts (29M), transaction_actions (12M), transactions (12M).

I have never done that on production, but I am ready to learn about it more and play with it on the copy of our DB.

@telezhnaya telezhnaya self-assigned this Jul 5, 2021
@telezhnaya
Copy link
Contributor Author

We discussed that in person; main conclusion: INSERT is not our problem for now, and it loks like partitions will not increase the speed of SELECTs. See #189 for more details

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

1 participant