session - Will a large number of tables (although of small size) in a database affect the performance of mysql queries? -


i have implemented android app in such way session tables handled mysql memory tables. session table created each active user keep speed high. led large number of session tables active users. presence of hundreds of sessions tables affect performance of mysql queries?

if tables deleted inactive sessions, don't see particular problem proliferation of "hundreds" of tables. hundreds of tables should fine. hundreds of thousands becomes issue.

i question whether have approach , whether overhead each session worth (this different question number of tables). creating , dropping tables incurs overhead -- system tables need maintained , locks on such tables slow things down.

in general, way handle such situations rows in existing tables. there circumstances isn't appropriate. instance, if session tables have significant user-defined content structures quite different. if structures same, there little reason have multiple tables, , lots of reason put data single table (perhaps partitioned session id if deleting rows concern).


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -