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?
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:
( , ..). SQL Server , , Oracle SGA. / .
, , , . , , . , , , (. PINTABLE). , , ( ). ( ) , , .
- . - , , , , .
sql-, , -. PLAN, .
IMHO, any table with less than 5000 rows should not be analyzed for power if the DBMS is running on a server.