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

utilize statscollector to estimate full table size #436

Closed
wants to merge 1 commit into from
Closed

utilize statscollector to estimate full table size #436

wants to merge 1 commit into from

Conversation

Lazyshot
Copy link

resolves #433

Copy link
Member

@dtracers dtracers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any performance metrics?

Overall this looks like an awesome change

@@ -312,6 +312,9 @@ def validate_code(self, key, value):
return value[:max_len]
return value

def count_query():
return "SELECT n_live_tup FROM pg_stat_all_tables WHERE relname = '%s'" % (Game.__table__.name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of this way if inserting the table names we should be able to do this in SQL alchemy without the need of a custom string.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree, I'm really not a fan of this. I'll take another crack at it.

@Lazyshot Lazyshot closed this Nov 25, 2021
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.

Fast count on homepage
2 participants