mysql which table is faster: with more rows or columns?

118 Views Asked by At

What of this mysql tables better for usage in mysql SELECT(if result of data > 10 000 rows) and for while(result of data)

Example:

this:

id | cost 1 | cost 2 | cost 3 | cost 4 | cost 5 |
 1 |  10    |  11    |   12   |  13    |    14  |

or this:

id | cost | costNumber
 1 |  10  |      1
 2 |  11  |      2
 3 |  12  |      3
 4 |  13  |      4
 5 |  14  |      5

Who know or tested, help ples!

1

There are 1 best solutions below

0
On

In my experience 2nd table is always better.