Re: Store and updating large number of columns

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Mon, 19 Mar 2018 17:15:56 -0400
Message-ID: <p8p9a7$q5p$1_at_jstuckle.eternal-september.org>


On 3/19/2018 12:02 PM, forough m wrote:
> Hi,
> I have many cells (10000 per hour) that each cell has 1000 counters(Keys and Values that comes during hours and need to update). I need to store cell name and counters, then calculate some formula on counters. But i don't know how to keep counters in MySql to having best update and select query performance.
> Now i keep them in Josnb in Postgresql, and want to store them in MySql.
> MySql Json has not index feature and it make slowly query. what do you suggest me?
>

Your first problem is trying to store the data in json format. This violates first normal form (multiple values in one field). Don't use json format; split the data into it's appropriate fields and have a separate column for each. Performance will be much better.

For instance, you might have a table which has a timestamp, cell id, counter key and counter value. You can then index as necessary.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Mon Mar 19 2018 - 22:15:56 CET

Original text of this message