« Sql » : différence entre les versions
De bricosoft
Page créée avec « ==jointures== http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/ » |
Aucun résumé des modifications |
||
| (4 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 2 : | Ligne 2 : | ||
==jointures== | ==jointures== | ||
http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/ | http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/ | ||
=sql server= | |||
==index== | |||
<pre> | |||
SELECT | |||
OBJECT_NAME(i.OBJECT_ID) AS TableName, | |||
i.name AS TableIndexName | |||
FROM | |||
sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'DETAILED') phystat | |||
INNER JOIN sys.indexes i | |||
ON i.OBJECT_ID = phystat.OBJECT_ID AND i.index_id = phystat.index_id | |||
WHERE | |||
phystat.avg_fragmentation_in_percent > 20 | |||
AND OBJECT_NAME(i.OBJECT_ID) IS NOT NULL | |||
ORDER BY phystat.avg_fragmentation_in_percent DESC | |||
</pre> | |||
https://ola.hallengren.com/ | |||
https://docs.microsoft.com/fr-fr/sql/linux/sql-server-linux-setup-docker | |||
https://www.microsoft.com/en-us/sql-server/developer-get-started/php-ubuntu | |||
https://mssqlwiki.com/ | |||
Dernière version du 9 décembre 2016 à 08:50
jointures
http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/
sql server
index
SELECT
OBJECT_NAME(i.OBJECT_ID) AS TableName,
i.name AS TableIndexName
FROM
sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'DETAILED') phystat
INNER JOIN sys.indexes i
ON i.OBJECT_ID = phystat.OBJECT_ID AND i.index_id = phystat.index_id
WHERE
phystat.avg_fragmentation_in_percent > 20
AND OBJECT_NAME(i.OBJECT_ID) IS NOT NULL
ORDER BY phystat.avg_fragmentation_in_percent DESC
https://docs.microsoft.com/fr-fr/sql/linux/sql-server-linux-setup-docker
https://www.microsoft.com/en-us/sql-server/developer-get-started/php-ubuntu