Viewing 15 posts - 3,661 through 3,675 (of 59,067 total)
I agree with what the others said. you've basically guaranteed that there's no chance of index seeks or high performance seek/range scans by embedding columns in functions, doing a leading...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 6, 2022 at 11:36 pm
My suggestion is that you REALLY need to STUDY RESTORE in the official documentation. Here's the link...
https://docs.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql
There are several caveats and possible gotchas and if you've not done...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 6, 2022 at 11:24 pm
Hey Jeff,
"SELECT Name_04, Name_05, Name_06, Cnt = COUNT(*)"
I executed the above query in the reference (security) table and the findings are as below. In total 1271 rows in total.
Cnt...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 5, 2022 at 10:26 pm
https://www.google.com/search?q=what+is+using+memory+in+SQL+Server
--Jeff Moden
Change is inevitable... Change for the better is not.
April 5, 2022 at 10:04 pm
Funny that you mention that. I do the same thing.
A long time ago, I remember that I would solve something (it wasn't SQL back then) in a dream, wake up,...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 4, 2022 at 7:04 pm
Although mostly about memory, the following article has some pretty good stuff about examining things when you have long running queries.
https://www.erikdarlingdata.com/sql-server/does-my-sql-server-need-more-memory/
--Jeff Moden
Change is inevitable... Change for the better is not.
April 4, 2022 at 4:56 pm
Ar you saying that you still need real live "running totals" in the output? If so, my question, again, would be WHY? What problem would those help you solve?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 4, 2022 at 3:52 pm
Hi Experts,
I have several more than 60+ Dates and I need to know which is last valid date for a particular record ?
All the timers are extracted in a...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 4, 2022 at 3:51 pm
With large tables, it's not likely that statistics are up to date (Frederico hinted at this in his post). What are you doing to keep statistics up to date (especially...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 4, 2022 at 3:30 pm
Easy now... in this case, the OP has pretty much stated what they want to do. The problem with the HAVING is that it becomes difficult to select the rest...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 4, 2022 at 2:42 am
This is supposed multi-selection question, isn't it? If so, radio buttons aren't going to work here.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 4, 2022 at 2:33 am
Ok... so the first and very important step is to "know thy enemy". With that, we have to know the "gazintas" for both tables. Run the following query one each...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 3, 2022 at 9:52 pm
I'm thinking that's still going to result in a massive accidental cross join I previously spoke of for the rows where all 3 of the join criteria are blank or...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 3, 2022 at 5:40 pm
Total agreement with all of you. Thanks for the comments.
Thanks for the article and your comments, as well.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 3, 2022 at 5:37 pm
This does the trick for me.
WITH cteByDB AS
(--==== Preaggregate that data including a grand total using ROLLUP and marking that total row with GROUPING_ID.
...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 3, 2022 at 4:21 am
Viewing 15 posts - 3,661 through 3,675 (of 59,067 total)