It depends which db type you are using.
Why poal.co does not index post_id for comments table?
It does. What you are looking at is the default Models.
Poal's tables are already all indexed.
One more question is that is it necessary to index parentcid of comments table? I mean comments are retrieved using pid in where clause. So does parentcid need to be indexed or not? I am confused.
Poal's code differs on how comments are retrieved (compared to Throat default code) since we added advanced sorting with sticky comments.
So yes, it is needed in our case.
I am using peewee for orm. I have already created table using SQL. now when i specify model for that table using peewee. Do i need to specify index=true for column that is already indexed. Is it necessary to specify index=true in peewee model? I am learning peewee for orm?
(post is archived)