SQL Database Statistics

Share this post on:

https://www.epiusers.help/t/baq-100x-slower-in-production-than-dev-test-vote-for-this-idea-for-an-easier-fix-in-the-future/88340

I would suggest you run a quick statiscs update on all tables involved in this BAQ in Production and see what happens. 9/10 times it flies right after. I’m not sure how you are doing maintainence on your DB but statistics are as important if not more than indexes sometimes.

Try this (this takes a few seconds to run even on the largest of tables and it shouldn’t hurt much maybe a small performance hit for a little while but perfectly fine in my eyes.

UPDATE STATISTICS Erp.PartRev WITH FULLSCAN
UPDATE STATISTICS Erp.<YourOtherTables> WITH FULLSCAN
UPDATE STATISTICS Erp.<YourOtherTables> WITH FULLSCAN

Also you may have old / cached plans on this BAQ in SQL you can change that by adding an OPTION(RECOMPILE) at the bottom of the query. This is kind of tricky to do, but if you don’t have an order by clause then go go

Share this post on:

Leave a Reply