我想组织我的表格并列出使用情况。我可以使用哪种标准(依赖性,填充因子,读/写速率,记录计数)?我想保护我的数据库免于死锁...
例如:简单来说,我的数据库中有四个表
a table : 4 dependencies
b table : 2 dependencies
c table : 2 dependencies
d table : No dependency
如果我想编写一个存储过程,首先使用哪个表?
答案 0 :(得分:3)
C = Check Constraint
D = Default or Default Constraint
F = Foreign Key Constraint
L = Log
Fn = Scalar Function
If = Inlined Table Function
P = Stored Procedure
Pk = Primary Key Constraint
Rf = Replication Filter Stored Procedure
S = System Table
Tf = Table Function
Tr = Trigger
U = User Table
Uq = Unique Constraint
V = View
SELECT DISTINCT SysObjects.Name 'Table Name',
Procedures.Name 'Stored Procedure'
FROM SysObjects
JOIN (SysObjects Procedures
JOIN SysDepends
ON Procedures.Id = SysDepends.Id)
ON SysDepends.DepId = SysObjects.Id
WHERE SysObjects.XType = 'U'
-- Change XType Values here using chart above
AND Procedures.XType = 'P'
GROUP BY SysObjects.Name,
SysObjects.Id,
Procedures.Name
ORDER BY SysObjects.Name ASC
取自here。