Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do you reindex DB?
Message
From
13/05/2021 07:55:05
 
General information
Forum:
Microsoft SQL Server
Category:
Indexing
Miscellaneous
Thread ID:
01680338
Message ID:
01680366
Views:
34
>Thank you, Martina. I will run your code on my SSMS first, before attempting it on the customer SQL Server.
>Two follow-up questions, please.
>1. Should - as far as you know - the defragmentation of indexes (running your code above or another way) be done by a DBA?
>2. Do you think it is a good idea to include the above code in the application (VFP 9) feature? That is, so that the end user can run it when they feel the data is slow?

My perception is that if you feel the performance is slow than some work has to be done to resolve the problem. You can use WA_Statistics to obtain basic information on missing indexes for exemple. Then, if you obtain metrics that certain requests are slow, probably based on some complex queries which contain a lot of fields in the where clause and a lot of included fields, then, as mentioned, you may build compound indexes. Please, note that any change in the query design needs the compound index to be adjusted. There is a limit of a certain number of fields which can be part of it.

I really wouldn't give that option to the user. This is something, if you should ever use that route, which is to allow someone to execute such a procedure, then it should be done by an administrator, off hours.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform