TERCIH ET reindex vacuum index analayse WITH TABLE STATISTICS maintenance
Definition Description
SELECT 'REINDEX TABLE "' || schemaname || '"."' || relname || '";' || E'\n' || 'VACUUM FULL VERBOSE ANALYZE"' || schemaname || '"."' || relname || '";' FROM pg_stat_all_tables ORDER BY n_dead_tup DESC;
VEYA AYRI AYRI
SELECT 'REINDEX TABLE "' || schemaname || '"."' || relname || '";' FROM pg_stat_all_tables WHERE "schemaname"='ERP' ORDER BY n_dead_tup DESC;
SELECT 'VACUUM FULL VERBOSE ANALYZE"' || schemaname || '"."' || relname || '";' FROM pg_stat_all_tables WHERE "schemaname"='ERP' ORDER BY n_dead_tup DESC;
-- kariyer SELECT 'GRANT ' || privilege_type || ' ON "' || table_schema || '"."' || TABLE_NAME || '" TO mbbackend;',* FROM information_schema.role_table_grants WHERE table_catalog = 'CoreLog' AND table_schema = 'public' AND privilege_type = 'SELECT';