What is the minimum number of rows required to create an index?

I created a script to find the selectivity of each column for all tables. In some tables with less than 100 rows, column selectivity is more than 50%. Where Selectivity = Significant Values ​​/ Total Number of Rows. Are these columns suitable for the index? Or, can you tell me the minimum requirement for the number of rows to create an index?

+5
source share
3 answers

You can index any column - the question is whether it makes any sense and whether this index will be used ...

, 1-5% - , . , . - .

, ( 2 ) , , . , - .

, , , -

  • , , .

, ( ) - .

, , , , , . Kimberly Tripp:

+5

( , ..). SQL Server , , Oracle SGA. / .

, , , . , , . , , , (. PINTABLE). , , ( ). ( ) , , .

- . - , , , , .

+2

sql-, , -. PLAN, .

IMHO, any table with less than 5000 rows should not be analyzed for power if the DBMS is running on a server.

0
source

All Articles