M
M
Maxim Timofeev2015-09-09 20:25:40
PHP
Maxim Timofeev, 2015-09-09 20:25:40

How to split a MySql table and is it worth it?

There is a table in it with the results of football matches, there are about 150 thousand of them.
There are also tables with events for it. Getting cards, goals, etc. They may contain more than 1 mil. records.
Is it correct to store it like this? I'm still designing and I have a question. How well will all this work and are there more logical solutions.
I will implement table relationships in the engine (yii2). There will be requests for a full match report and requests for similar statistics on a player based on matches with him.
There are links to read - let's.
There are thoughts - write.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Crash XD, 2019-04-05
@mrusklon

What does the $items array look like before the filter?

array(
    'field' => 1,
    'hours' => 2
);
More or less like this?
Then in the filter function, $item will be equal to the value (1 or 2, for example). And the value is not an array, so it doesn't have a 'hours' field.
Try$item['hours'] !== 0

M
Melkij, 2015-09-09
@melkij

Even for such an amazing thing as mysql, lam records are garbage. One hundred lyams - more serious, but also garbage.
Read explain's and profiling, something can be partitioned by the standard mysql partitioning mechanism.
More logical solutions are to take postgresql.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question