I am just wondering if anyone has any pointers on how to index my database. It's for a piece of instrumentation software that loads in large amounts of sensor data (sometimes over 3 days worth of recording at 1 second intervals for 90 sensor's doubles). Right now it can load a 3 day job and graph it in about 15 seconds, I am looking to make that closer to 3 seconds.
Heres the tables involved:
JobHistory
---------
ID - UINT PK Autoincrementing
JobName - String
JobSummaryData0 to JobSummaryData15 - String
(There's some other data related to the job, not the sensor data though)
JobData
--------
ID - UINT PK Autoincrementing
JobID - FK Linking to JobHistory ID
Data0 to Data99 - Sensor data
Right now I am indexing JobData by ID and JobID in a binary tree. I am somewhat of a database noob, so am open to any sugguestions as to how to improve the performance. We use MySQL as our DB server running on the localhost using the InnoDB engine. To fetch the data we display the whole jobhistory in a gridview and use Select * from JobData where JobID=@myID
.
I don't really know if this belongs in the C# forum, but there seems to be a lot of DB stuff on here and it seems to get more activity than the DB forum.