PostgreSql数据库的重建索引时通过REINDEX命令来实现的,如reindexindex_name;其语法是:REINDEX { INDEX | TABLE | DATABASE | SYSTEM } name [ FORCE ];下面解释下说明情况下需要:1、当由于软件bug或者硬件原因导致的索引不再可用,索引的数据..
参考sys.dm_db_index_physical_stats检查索引碎片情况1.SELECT2.OBJECT_NAME(object_id) as objectname,3.object_id AS objectid,4.index_id AS indexid,5.partition_number AS partitionnum,6.avg_fragmentation_in_percent AS fra7.FROM sys.dm_d..