Query in very long delay tables? Mysql

Asked

Viewed 649 times

1

I am developing a system that I hope to become great in the future and I have a dilemma: store an array in each user’s data or create a specific table with all this mixed information

(Ex: each user’s cars)

My question is:

If I make a table and it has say 500,000 lines, it will cause some delay when sql goes through it to return me the data?

Storing arrays in tables is a good programming practice?

1 answer

1

Storing arrays in tables is a good programming practice?

Database does not save Array, but String, such as JSON. Then see that it gives in the same as saving as string. The problem is in maintenance and not in performance. If it is a good practice of programming, nay, as it mainly damages documentation, and therefore maintainability. But each case is a case, sometimes the information of the Array is little reusable in the system and divide it in the database, could overload the database with tables.

If I make a table and it has say 500,000 lines, it will cause some delay when sql goes through it to return me the data?

It is logical that a database tends to get slower as the amount of record, this is inevitable. But you can reduce the amount of SELECT attributes by making the transfer process faster. But this is not possible if the data is inside a ARRAY.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.