Viewing 15 posts - 406 through 420 (of 7,597 total)
If you don't already have an index on the dbo.OptionsEOD table to directly support the "LAG(T1.CLOSE_PRICE) OVER PARTITION BY T1.UNDERLYING_SYMBOL, T1.ROOT_SYMBOL, T1.EXPIRATION, T1.STRIKE, T1.OPTION_TYPE ORDER BY T1.QUOTE_DATE)" you should try...
July 3, 2023 at 1:37 pm
as an example - assume a sequence increment of 500 - and you need 5000. ...
you do a "SELECT NEXT VALUE FOR sequencename; " 10 times and you immediately...
June 30, 2023 at 9:44 pm
The most important thing (assuming basics such as enough RAM and CPU, etc. are OK) is likely to analyze missing index data (do not blindly build all indexes SQL suggests). ...
June 29, 2023 at 3:08 pm
SQL Server does not allow duplicate column names in a table.
You could put brackets in the actual column name if you really wanted to, although of course that's a terrible...
June 22, 2023 at 3:03 pm
I agree. Yes, MS might have good reasons for dropping the cache in those cases, but it should document that it will do that.
June 12, 2023 at 5:31 pm
That seems to be normal SQL Server activity, to clear the plan cache when certain ALTER DATABASE statements are executed. Ref:
https://www.sqlskills.com/blogs/erin/query-store-and-the-plan-cache-flushing/
June 12, 2023 at 2:55 pm
Your table looks to be clustered first (probably only) on ID. Add add_date after ID in the clus index to help that type of query.
June 8, 2023 at 2:17 pm
Oops, I misread, I thought the 3rd column was just INCLUDEd, and that it had the same key columns as the original index.
June 6, 2023 at 8:20 pm
The new index should handle any existing fk constraint(s), since both indexes have the same keys.
A unique constraint should be a different structure, i.e., you'd have to use a DROP...
June 6, 2023 at 5:05 pm
Yes, you can delete idx1. If you use hints that force use of that specific index (which is very rare (or at least should be!)), then you would have to...
June 6, 2023 at 2:02 pm
SELECT T1.UNDERLYING_SYMBOL,
T1.QUOTE_DATE,
...
June 5, 2023 at 1:45 pm
OK. Let's both write a report with control breaks. I'll do it in COBOL ... in an hour or so. (Good COBOL programmers had templates for each major...
May 31, 2023 at 3:06 pm
Sure COBOL had about a 12 year head start on C (1959ish versus 1972ish) but I would find it hard to be convinced that anything written in the 1973...
May 31, 2023 at 2:26 pm
For a specific day, then:
Select
Name
,Login_Email_Address
,CAST(Date AS date) AS Date
from User_acticvity
Group By Name, Login_Email_Address, CAST(Date AS date) AS Date
Having Sum(Case When action = 'Login' Then 1 Else 0...
May 25, 2023 at 4:57 pm
I suggest you consider "ingredients" as an entity rather than separate "items" and "fluids". ingredient would be a super-type, with sub-types of either item or fluid, while allowing for other...
May 21, 2023 at 4:54 pm
Viewing 15 posts - 406 through 420 (of 7,597 total)