Click to See Complete Forum and Search --> : Rows vs. Columns


sarkocreme
06-26-2009, 01:04 AM
Which database would be better?

200k rows, 25 columns

OR

2 million rows, 2 columns

I'll probably have to access the one with 2 million rows twice as often. My thought is #1 based on my assumption that accessing the right row slows down the process more than other tasks.

triassic
06-26-2009, 03:29 PM
Performance-wise, it doesn't really matter if your queries will use an index. 2 million rows using an index will be significantly faster than 200k rows without an index. But with no index, 200k of course will be faster.

sarkocreme
06-27-2009, 11:14 AM
Either one would use an index. Is there a point where the number of rows on the larger row table would run slower than the larger column table? Or with an index would that put their speed always in the same spot?

The larger row table will always have roughly 10x the rows as the larger column table. Columns are static.

triassic
06-30-2009, 01:33 PM
I'm no DB expert, but with indexes, 200k vs 2mil isn't going to make any difference. As for number of columns, I don't see how more would make a difference.

You can always run some tests, see what happens.