Viewing 15 posts - 841 through 855 (of 7,597 total)
Why are using this setting: SORT_IN_TEMPDB = OFF?
That's generally a very bad idea overall, esp. for larger indexes.
June 3, 2022 at 6:12 am
I would think you'd want the last Response rather than just picking one seemingly at random (as in your results) or the value that happened to be the MAX one...
June 1, 2022 at 7:40 pm
You should get rid of the local variable as it's not needed and causes overhead. Also, make sure that ANSI_NULLS and QUOTED_IDENTIFIER are set properly when the function is created.
May 31, 2022 at 1:47 pm
If you have 200 entries, at least use a form of binary search rather than searching sequentially thru the list. Even better would be just looking it up in a...
May 31, 2022 at 5:46 am
;WITH cte_distinct_customer_regions AS (
SELECT DISTINCT Customer_Key, Customer_Name, Component, Region
FROM Fill_Gaps
)
SELECT
cdc.Customer_Key, cdc.Customer_Name, cdc.Component, cdc.Region,
...
May 27, 2022 at 7:23 pm
SQL Server has a system view, sys.dm_db_file_space_usage. In that view is column modified_extent_page_count, which tells how many db pages have been modified since the last full db backup. If you...
May 27, 2022 at 3:49 pm
No, not directly from SQL Server anyway. SQL has no mechanism to allow only certain parts of data in a table to be backed up.
You back up databases (or filegroups,...
May 26, 2022 at 5:26 pm
Look at the usage stats for the indexes to see if they are useful (and/or more useful than not).
There's no single number of max indexes for a table. It depends...
May 25, 2022 at 3:32 pm
Didn't have usable data to test with, so the code is untested:
SELECT A.Name, A.DateOfBirth, ot.Count
FROM TableA A
CROSS APPLY (
SELECT TOP (1) *
...
May 24, 2022 at 5:26 pm
Your structure should be normalized, as you stated.
create table #countries
(
company int,
[year] int,
rev int,
country_sequence smallint,
country varchar(100)
)
(12011,2010,121,1,'Egypt')
(12011,2010,121,2,'France')
,,,
May 23, 2022 at 3:10 pm
We need to see the actual lookup code to offer more specific advice here.
Proper indexing could also be critical to getting best performance for this task.
May 23, 2022 at 3:05 pm
It's probably a bad idea all the way around anyway. 🙁 How many people do you know that actually have a "Baseline" to compare against?
For me, it would work...
May 20, 2022 at 7:44 pm
You have the general structure for that, you just had a typo in the SELECT for the cursor. You had:
DECLARE job_cursor CURSOR READ_ONLY FOR
SELECT @job_name, [enable]
FROM #JobsToDisableEnable
@job_name will contain NULL...
May 20, 2022 at 7:41 pm
The DECLARE for the cursor is incorrect: you need to remove the @ from before "@job_name":
DECLARE job_cursor CURSOR READ_ONLY FOR
SELECT job_name,[enable] --<<--
FROM #JobsToDisableEnable
Also, in the EXEC, you...
May 20, 2022 at 5:32 pm
Hello,
I was looking over the Edition specifications, and Standard is capped at 128 GB RAM is that correct?Can someone recommend me to use sql server enterprise edition or...
May 20, 2022 at 3:59 pm
Viewing 15 posts - 841 through 855 (of 7,597 total)