this is not so much about the database models as it is about the queries being
emitted and what kinds of data are being returned.
I would go through the section at
https://docs.sqlalchemy.org/en/20/faq/performance.html#how-can-i-profile-a-sqlalchemy-powered-application
and identify where the is
Hello! I have three post type and inherit from post table. And this post
have comment and like table foreign key. But I am using this method my
performance very very low. One page loading 3-4 sec. How can I do?
My Tables
Post(Model):
id
name
PostType1(Post):
id
content
PostType2(Post):
id
body