November 9, 2023 at 10:43 am
Hey guys, I'm having a real tough time optimizing a SQL query for my project. I've been working with SQL Server for years, but I've never encountered this issue before. The query is supposed to search for specific contact toasts for a personalized user experience https://www.gbgenie.com/gb-whatsapp/ Preserve your status updates with the anti-delete status option, Manage the visibility duration of your status updates with flexible time limit settings. date ranges within a large dataset, but the search results are inconsistent, which is really unexpected and confusing. Honestly, I'm starting to doubt the reliability of SQL Server. I really need your help to pinpoint the cause of this issue. Do you think the problem is in the indexing, or maybe the query itself? Could there be a problem with the date format? I'm eager to hear your insights and suggestions on how to optimize this query and improve the accuracy of SQL Server data searches.
November 9, 2023 at 11:09 am
People here will need a lot more information before they can provide any sort of detailed assistance.
A good starting point will be to paste a copy of your actual execution plan here: https://www.brentozar.com/pastetheplan/ and then post a link to it in this thread.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
November 9, 2023 at 11:10 am
You could also include a copy of the query here (use a Code block for formatting)
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
November 9, 2023 at 12:53 pm
So, SQL Server is time-tested and extremely reliable. It simply does not randomly provide values based on whims or anything like that. It is ALWAYS down to the code, structures, and data that you (and I don't mean you personally, but you collectively) build and apply.
So, the way to troubleshoot this is to break it down. Don't simply look at the whole enormous query. Instead, look at one thing and one thing only initially, the filter criteria. Then, look at the structure that the filter criteria is going against. Then, look at the data. Is all that consistent? If not, why not? And, if you're getting inconsistent results, I promise you, it's not because SQL Server is randomly substituting other things for the code you're sending it.
As to details, you haven't provided any, and as Phil says, without 'em we can't get more specific.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
November 9, 2023 at 1:18 pm
please follow:
How to Post Performance Problems
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply