Viewing 15 posts - 286 through 300 (of 2,610 total)
What's more interesting than any of that is how we missed the forest for the trees. 🙁 The MAX solution that Peter provided is all that's needed here. [headdesk].
Yes,...
July 16, 2023 at 3:51 pm
There is an article on the same problem here: https://www.mssqltips.com/sqlservertip/5279/sql-server-error-query-processor-ran-out-of-internal-resources-and-could-not-produce-a-query-plan/
What State did the error return? (1 or 2)
State 1 - The query timed out due to the...
July 15, 2023 at 11:37 pm
drop table if exists #t1
drop table if exists #t2
drop table if exists #t3
go
set statistics io, time on
go
SELECT p.FIRST_NAME,
p.LAST_NAME,
...
July 14, 2023 at 4:07 pm
I've got a (8 years old) Dell XPS 8700 desktop with a i7-4790 and 28GB RAM, and a SanDisk Ultra II 960GB SSD with the tempdb on...
July 14, 2023 at 6:52 am
Set up test data
set statistics io, time off
DROP TABLE IF EXISTS dbo.PATIENTS;
CREATE TABLE dbo.PATIENTS
(
FIRST_NAME varchar(50),
...
July 14, 2023 at 12:58 am
Ah... I see my confusion here. The op posted a recursive CTE where he said it wouldn't work with the word RECURSIVE and Frederico said that RECURSIVE is not...
July 10, 2023 at 9:13 pm
I think you might want a recursive common table expression.
Something like this:
DECLARE @n int = 3;
WITH Factorial(F,n) AS
(
SELECT 1 ...
July 10, 2023 at 8:57 pm
I think you might want a recursive common table expression.
Something like this:
DECLARE @n int = 3;
WITH Factorial(F,n) AS
(
SELECT 1 ...
July 10, 2023 at 3:10 pm
You could do with reading this: How to post code problems
DROP TABLE IF EXISTS dbo.PATIENTS;
CREATE TABLE dbo.PATIENTS
(
FIRST_NAME ...
July 5, 2023 at 9:33 pm
If you use:
SET STATISTICS IO, TIME ON
you will also get the CPU usage for the query.
July 5, 2023 at 9:10 am
I think the following index should help performance:
CREATE INDEX IX_OptionsEOD_1
ON dbo.OptionsEOD (UNDERLYING_SYMBOL, ROOT_SYMBOL, EXPIRATION, STRIKE, OPTION_TYPE, QUOTE_DATE)
INCLUDE (CLOSE_PRICE)
;
July 3, 2023 at 5:10 pm
To increase the performance you could limit the rows the query in the CTE produces by selecting on the QUOTE_DATE going back a given amount of days to when you...
July 3, 2023 at 3:08 pm
Another option:
WITH CTE AS
(
SELECT T1.UNDERLYING_SYMBOL,
T1.QUOTE_DATE,
...
July 3, 2023 at 2:28 pm
SELECT T1.UNDERLYING_SYMBOL,
T1.QUOTE_DATE,
T1.ROOT_SYMBOL,
T1.EXPIRATION,
...
July 3, 2023 at 1:41 pm
Yes you can, I've upgraded from SQL 2012 to 2019 by just restoring a backup.
July 3, 2023 at 11:24 am
Viewing 15 posts - 286 through 300 (of 2,610 total)