How to increase the performance of a Database?

后端 未结 10 2272
我在风中等你
我在风中等你 2021-02-14 15:15

I have designed databases several times in my company. To increase the performance of the database, I look for Normalisation and Indexing only.

If you were asked to incr

10条回答
  •  伪装坚强ぢ
    2021-02-14 16:00

    There are many things you could do, a lot of them already suggested above. Some that I would look at (in this order):

    • Errors/logs - many db engines have reporting tools that point out problem areas in a database. Start here to see if there's anything you can focus on right away.
    • Data retention - check business specification how long data should be kept for, make sure any older data is moved off to a data warehouse to keep table size small. (Why keep 5 years of data if only need last 3 months?)
    • Look for table scans, index the data if it will help (you have to gauge this one against table writes). Your server logs can probably help you with finding table scans.
    • Atomic elements of work, are some writes keeping locks on different tables before a commit point is reached? Can those elements of work be simplified or commit points moved to speed up performance? This is where you will need a developer to look at the code.
    • Look for long running SQL statements, can it be made more efficient? Sometimes poorly structured queries can really bog an application down. You may need to suggest a coding change to improve performance.
    • dba realm: look at how tables are allocated: page size, multiple segments etc. This is where diagnostics tools from the vendor come in handy, as they can often suggest how you can structure a table based on usage history. An experienced dba would be useful here.
    • look for hardware/network bottlenecks. This is where you would need a hardware guy. :)

    These are really high level, I would also take a look at what the vendor of your db engine suggests as performance improvements.

    Also, I would gauge a list like this against what my boss is willing to pay for and how much time I have. ;)

    Hope this helps.

提交回复
热议问题