refactoring databases - Split large sqlite table by sessionid field -


i relatively new sql(ite), , i'm learning go while working on new project. have got millions of transaction rows in 1 "data" table, 1 field being "sessionid" field.

since want concentrate on in-session activity now, need @ transactions same sessions.

my intuition is, lot faster if separate database sessions many single session tables, querying single sessionid, , proceeding. question: correct? make difference?

even if not: me out , tell me, how split 1 "data" table rows many session-specific tables, rows staying same? plus 1 table relates sessionids tables?

thanks!


a friend told me, splitting-into-tables thing extremely unflexible, , should try adding distinct index instead different sessionid rows access single sessions faster. thoughts on , how best?

first of all, having specific performance bottleneck till now? if yes, please describe it.

having 1 table per session speed lookups/indexes (for inserts) things up.

sqlite doesn't impose limit on number of tables, should okay.

one other solution provides easier maintenance, if create 1 table per day/week.

depending on how long sessions last, feasible or not.

related: https://stackoverflow.com/a/811862/89771


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -