Tag Info

New answers tagged

2

By index file, you mean you place indexes on a dedicated filegroup that maps to the file in question? Yes, it could indeed be smaller. Indexes can become fragmented over time (inserts and updates need to split pages when inserting into a range) causing free space on your pages over that defined by your fillfactor. If your fillfactor is say 80%, this is not ...


2

Index rebuild will update statistics of column with a equivalent of full scan. Reorganizing index will not update statistics at all. For more detailed explanation Ben Nevarez has written more in his blog 1) By default, the UPDATE STATISTICS statement uses only a sample of records of the table. Using UPDATE STATISTICS WITH FULLSCAN will scan the entire ...


1

You can't go wrong with Ola Hallengren's award winning solution. It's pretty awesome ; https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html You can schedule this to run once a day to begin with, and then you should re-evaluate your needs based on how busy the solution actually becomes regarding the needed index maintenance on your ...


1

I would suggest that you use Ola Hallengren's scripts, freely available and widely used. His website is: https://ola.hallengren.com/ •DatabaseBackup: SQL Server Backup •DatabaseIntegrityCheck: SQL Server Integrity Check •IndexOptimize: SQL Server Index and Statistics Maintenance He has the best practices coded into his scripts, so it should serve you ...


5

Don't re-invent the wheel; just get a solution like Ola's in place now: Ola Hallengren's SQL Server Backup, Integrity Check, and Index and Statistics Maintenance You can tweak the settings and learn how it works over time.


0

Hope you are using Mysql database. The following script list all the databases and its tables that where updated within the last 30 days. You can change the interval as per your requirement. USE information_schema; SELECT DISTINCT TABLE_SCHEMA , TABLE_NAME FROM TABLES WHERE UPDATE_TIME IS NOT NULL AND UPDATE_TIME > NOW() - INTERVAL 30 DAY ...


0

50K rows tables are rather small. Before throwing more hardware at it, I'd recommend checking/tuning the following: my.cnf setting: make sure you have good buffers on InnoDB buffer, Key Cache, Query cache, etc. If website is calling same queries over and over, query cache could help. Check slow query log and optimize worst queries. It'd say this would ...



Top 50 recent answers are included