Does the query speed depend on the number of rows in the table?

Say I have this query:

select * from table1 r where r.x = 5

Does the speed of this request determine the number of rows present in table1?

+3
source share
6 answers

Many factors depend on the speed of the request, one of which may be the number of rows.

Others include:

  • index strategy (if you specify the column "x", you will see better performance than if it were not indexed)
  • Server loading
  • - . , , . ,
  • - . , , SQL Server, , .
  • , ( !). -

, , ( SQL Server 2005 Enterprise Edition ). . , = = = .

+6

, .

100 , SQL- , . , 10 .

, "x", sql , , , sql .

, 100 x = 5, 10 .

+3

. : , ? : , r.x , , .

+1

( ) , () - , . .

+1

"". . ,

, . , , .

+1

, . , ( O(N) ) . , , , SQL , . , : , O(log(N)) ; , O(1). : : SQL

+1
source

Source: https://habr.com/ru/post/1738947/


All Articles