0

There is a SQL server, there are around 100 databases in it. I have to query a few tables from one of the databases. when I query, it's very slow and I think CPU utilization is very high at that time. I have also noticed that there are queries from other tables from other services which are affecting the overall performance of querying from the database.

I am thinking to move these tables to a different database within the same SQL server. Do you think it will solve this issue? or it will not improve the performance of querying from my tables, I only bother about my tables. Will it have no impact because the new data will also be in the same SQL server? Please provide the answers in detail to my queries.

1
  • 2
    You should find out why the performance is poor, then start figuring out how to fix it.
    – vonPryz
    Commented Jun 21, 2023 at 7:32

2 Answers 2

0

Download sp_BlitzFirst and start troubleshoot your SQL Servers.

Copying the tables to another database will certainly do nothing. Especially if the database is on the same SQL Server.

-1

EDITED after clarification:

It is, not that simple. It depends on how many tables are affected the size of the tables, databases, and where the database files are located not just logically but physically. What is the memory that you can use and is there well-balanced storage under the databases? I suggest you use execution plan and try to figure out why the query is slow.

7
  • I said "it might"- I edited and made it bold formatted to be more clear, I also mentioned that it is a deeper problem than it looks like. I suggested some things to check points, disk, network, memory... It will help him to find the weak points of the infrastructure.
    – kesadae11
    Commented Jun 21, 2023 at 7:47
  • @kesadae11 These are not cross database queries.. and these databases are on the same server
    – Vivek Nuna
    Commented Jun 21, 2023 at 7:48
  • @vonPryz Is this statement correct? SQL Server allows you to allocate resources at the database level, such as CPU limits, memory allocation, and I/O priority. By moving the tables to a separate database, I can allocate dedicated resources to that database, ensuring that the queries have sufficient resources available for execution, potentially improving their performance.
    – Vivek Nuna
    Commented Jun 21, 2023 at 7:55
  • then please clarify the question, you wrote "databases", then why was it important that there is 100 database? @vonPryz is right and I misunderstand this question, there is no short answer, You should find out why the performance is poor
    – kesadae11
    Commented Jun 21, 2023 at 7:58
  • @VivekNuna I edited my answer depending on the comment thread.
    – kesadae11
    Commented Jun 21, 2023 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.