Page 1 of 1

MySQL tuning?

Posted: Sat Feb 23, 2019 6:16 pm
by staze
Curious if anyone has looked into adding additional Indexes for alldata? I note the DateTime is the primary key, but also the only index that exists. Just wondering if there would be any speed to be gained as I've got about 1,005,000 rows in my database and occasionally things seem to take a little bit to load.

Thanks!

Re: MySQL tuning?

Posted: Tue Mar 05, 2019 10:35 pm
by Jachym
Hi,
not sure, the thing is, in 99% of cases, the filtering is based on date/time

Re: MySQL tuning?

Posted: Tue Mar 05, 2019 11:51 pm
by staze
Jachym wrote: Tue Mar 05, 2019 10:35 pm Hi,
not sure, the thing is, in 99% of cases, the filtering is based on date/time
Cool, makes perfect sense.

Thanks!

Re: MySQL tuning?

Posted: Wed Mar 06, 2019 9:59 am
by andyk1
Actually there are two times. First your local time and second is UTC time. Really the only thing you can do is re-index on the UTC time if your have added missing data which gets added to the end of the database file or manually corrected (edited) erroneous data which in that case you would not need to re-index. You need at least have a basic knowledge of MYSQL. See http://www.meteotemplate.com/web/wiki/wiki1GB.php for a basic understanding before attempting.

I also have over a million lines of data and from time to time noticed a lag which is basically my host server being heavily used on a shared server.

The other thing I have done is added more memory (at a cost) to my server account as I have over 4gb of files mostly my weather cam files taking up the bulk. I will be cutting it off at a year of webcam files in the near future.

Andy