-2

True or False: a table with large records (rows) due to lots of fields (columns) will take longer to return a SQL query?

That is, if I have a SELECT ... WHERE...query in SQL that operates on a table that has many fields, and hence lots of big data heavy rows, this SQL query will be significantly slower or slower than the same SELECT/WHERE Sql query that operates on a table having fewer fields?

I want a definite answer. None of this "it all depends, why don't you test it and see" stuff either. ;-) I say it makes no difference unless you pick some absurd number close to the maximum number of fields you can support in a record. Target is SQL Server 2008. Thanks.

EDIT: What I am saying is a table with fields "GUID", "NAME", "ADDRESS"...and 50 other parameters will take longer to return a SELECT/WHERE query against a second table having only "GUID" and "NAME", with the WHERE of course being '= NAME' (and the same raw number of rows, let's say both have 10000 rows in the table).

PaulDecember
  • 5
  • 1
  • 1
  • 4

3 Answers3

2

True

user9517
  • 115,471
  • 20
  • 215
  • 297
1

the selection itself should be the same as other with similar conditions on 'smaller' tables; but the data transfer from disk and over the network does take some time too, and that would definitely be impacted by the amount of data.

in many (most?) cases, thought, data transfer time is far less than record selection time. If so, the impact of data size could be negligible.

Javier
  • 9,268
  • 2
  • 24
  • 24
0

Use your brain. Really. Simplistic answers are not sensible.

NATURALLY it will amke a difference because there is a difference in processsing power AND TRANSFER SPEEDS between 100 and 100 milllion rows (and no, 100 million rows are not absurd - I run 50-200 million row queries multiple times per day).

This starts with the amount of memory banwidth and not at the end ends with something as simple as NETOWRK banwidth - 10 rows have a lot less data than 10 million ,and the network is unlimited in what it can transport per second.

To your edit: You go from 3 fields to 53 in comparisn - make the math yourself. Normal networks should allow 100 megabytes per second. So, yes, naturally it makes A difference. Thee question is how relevant that is. But then, hey, you make it explicitly clear you are not interested in really understanding the issue but want a binary yes/no answer. You got it.

TomTom
  • 51,649
  • 7
  • 54
  • 136