Viewing 15 posts - 1,951 through 1,965 (of 7,614 total)
SQL provide missing index info that you can use to help determine whether you need other index(es) or not, or even whether you need to change the clustered index to...
January 21, 2021 at 7:38 pm
OK, technically, other queries in the same transaction that did the UPDATE could see it before committing it, in something like this:
BEGIN TRANS
UPDATE
SELECT
COMMIT TRANS
But not within the context of a...
January 21, 2021 at 7:34 pm
Actually you'd get an error, since alias "s." is not defined.
January 21, 2021 at 3:59 pm
The old value. The new value can't be seen by a transaction modifying that table until the transaction's been committed.
January 21, 2021 at 3:53 pm
You really need to provide directly usable table structures and data. That is:
CREATE TABLE and INSERT statement(s)
CREATE TABLE #df1 /*or just df1*/
( version varchar(10) NOT NULL, host ... )
INSERT INTO...
January 20, 2021 at 10:42 pm
SSMS is not great about how best to define indexes.
Would you be able to post the query and the DDL for the table, including the indexes?
And please confirm, are you...
January 20, 2021 at 7:03 pm
Maybe as below. No directly usable data so I can't test it. This code takes advantage of the fact that df1.host is known to be equal to df2.pc.
January 20, 2021 at 2:39 am
I don't think there is a single "best" CPU%. But I would be OK with generally 80-90%, as long as there weren't periods where it spiked above 95% and stayed...
January 17, 2021 at 4:32 am
thanks. It was vendor supported application. We are not allowed to change any query though
I'm confused then. When you originally asked:
Any suggestion to tune this query?
Did you expect we...
January 16, 2021 at 6:00 am
You really should not use a temp table for this. It's a lot of overhead copying rows to the temp table, esp. if you then separately build an index afterward. ...
January 16, 2021 at 5:55 am
It shouldn't be clustered, but you do need an index, as I noted above, on:
( user_id, allowed_member_id )
January 15, 2021 at 6:26 pm
If the user has a restriction on the members he can view, we're inserting into a temp table only the members he is allowed to see;
Isn't the list of allowed...
January 15, 2021 at 3:07 pm
contains (PRODUCTS, 'Product1 OR Product2 OR Product3 OR Product4 OR ...')
January 15, 2021 at 9:08 am
kind of you can.
- View any database
- connect any database
- view any definition
- select all user securables
Nice. I was familiar with the others but not with "select all user...
January 14, 2021 at 5:41 pm
You specified an INNER JOIN. That means SQL must check to see if a matching row(s) exist in the other table because, if not, SQL can't return the row. YOU...
January 14, 2021 at 5:38 pm
Viewing 15 posts - 1,951 through 1,965 (of 7,614 total)