Viewing 15 posts - 361 through 375 (of 2,883 total)
Possibly a dumb question, but if secondary should never become primary, do you even need AG to be set up? Could you set up something like replication instead?
As for having...
January 10, 2024 at 5:07 pm
How is this (performance wise and for what you need):
DECLARE @Histo AS DATE;
SET @Histo = '1900-12-31';
;WITH Customers
AS
(
...
January 9, 2024 at 9:42 pm
I am glad you got it optimized. One thing that MAY also help with your optimization is to change your UNION to a UNION ALL. That will remove an implicit...
January 9, 2024 at 9:14 pm
That is a long run time... so it sounds like it needs some optimizing.
How much data are you working with and where are you presenting the data? If it is...
January 9, 2024 at 8:21 pm
For handling it dynamically, I imagine it would be possible, but dynamic SQL is always risky. Since this would be a "write once and never again" (hopefully), my opinion is...
January 9, 2024 at 7:04 pm
There was some problems with your CTE's for the between_rows data due to the filter on RN=1. That shouldn't be applied on the between_rows set of data (happens higher up...
January 8, 2024 at 10:06 pm
Feel free to ask. In my experience, I haven't needed to use the import functionality before. I've exported when I needed a data dump of all my reports to disk...
January 8, 2024 at 8:15 pm
This looks like a homework or assignment or an interview question, so you will forgive me for not just spitting out a full TSQL query for this. What is always...
January 8, 2024 at 8:12 pm
The best way I know how to do it then is to do an export to disk and then import it back in a new folder.
Here is the export script:
January 8, 2024 at 3:24 pm
@graham.hitchings - A unique column will have high cardinality too based on the link in the QOTD. It states:
An example of a data table column with high-cardinality would be a...
January 5, 2024 at 6:53 pm
Just wanted to add to Thomas Franz's third paragraph - from my experience, when people are being let go, it is SOMETIMES based on how important and how good they...
January 5, 2024 at 6:06 pm
As far as I know, there is no way to do that. The best solution I know of is to make a new folder and push the files over manually...
January 5, 2024 at 5:44 pm
If it is "results to screen", it is more likely the rendering on screen that is the slowness and not the data retrieval/download process and in that case, an indexed...
January 5, 2024 at 4:58 pm
ALSO I am not saying "don't use indexed views", I am saying test it. Even just adding 1 index will impact INSERT, UPDATE, and DELETE performance (and can impact SELECT...
January 4, 2024 at 8:02 pm
Just a heads up about indexed views - in SQL Server Standard, indexed views must be explicitly requested to use the index. In enterprise the query optimizer will use the...
January 4, 2024 at 3:59 pm
Viewing 15 posts - 361 through 375 (of 2,883 total)