Viewing 15 posts - 436 through 450 (of 2,648 total)
I still don't understand why an AWS server that costs more per month to rent than the entire cost of buying my laptop new should take 10 times...
April 1, 2023 at 12:22 am
Indexes are needed as the temp tables are joined to other tables, without indexes the queries would take a lot longer.
You and I have know each other for...
April 1, 2023 at 12:09 am
I think you might want this for a recursive CTE:
;with cte as
(
select *
from [#ChannelInfo]
...
March 31, 2023 at 12:01 pm
To fix it I had to create the temporary table first with the clustered index then insert the data.
When I said "we", I should have said "they". What...
March 31, 2023 at 11:07 am
drop table if exists #temp;
select *
into #temp
from (values (1,21.5,1,20.5, cast('20230121' as date)),
...
March 30, 2023 at 3:56 pm
I can't see how you can order the data in that table?
Can you provide how the table looks before and after the update?
March 30, 2023 at 3:11 pm
The DBA's right about the concurrency issue.
Please be specific as to what kind of blocking occurs and how long it actually lasts.
Then, let's see some proof...
March 30, 2023 at 2:10 pm
Just wondering what is the point of @Period in function fn_TableByPeriod?
@jonathan-2 AC Roberts
What is it that you are wondering about in this regard?
Alter FUNCTION fn_TableByPeriod(
@Period...
March 28, 2023 at 10:48 pm
Msg 156, Level 15, State 1, Line 46 Incorrect syntax near the keyword 'WITH'.
Did you terminate the previous statement with a semicolon?
March 28, 2023 at 3:50 pm
Your subquesry:
SELECT MAX([Datetime])
FROM [mydbtemp]
WHERE [Tagvalue] = 2
AND [Datetime] BETWEEN '2023-02-01 01:00:00' AND '2023-02-05 20:00:00'
returns '2023-02-03 07:00:00.000'
So your query is equivalent to...
March 27, 2023 at 2:30 pm
Just wondering what is the point of @Period in function fn_TableByPeriod?
March 27, 2023 at 8:40 am
SELECT [Datetime]
FROM [mydbtemp]
WHERE [Tagvalue] = 1
AND [Datetime] > (SELECT MAX([Datetime])
FROM [mydbtemp]
WHERE [Tagvalue] = 0
AND [Datetime] BETWEEN '2023-02-01 01:00:00' AND '2023-02-05...
March 26, 2023 at 6:58 pm
The table you are selecting from (my_table) is not the table you have created (mydbtemp). Also the column names are different.
I think you meant to put this as your query:
March 26, 2023 at 2:25 pm
Serious "chicken dinner" there for performance, Jonathan... here are the stats from a test on a million rows of 16 hex digits (8 bytes)...
SQL Server...
March 16, 2023 at 2:04 am
Serious "chicken dinner" there for performance, Jonathan... here's stats from a test on a million rows of 16 hex digits (8 bytes)...
SQL Server Execution Times:
...
March 15, 2023 at 9:25 pm
Viewing 15 posts - 436 through 450 (of 2,648 total)