Viewing 15 posts - 91 through 105 (of 161 total)
MadAdmin,
First of all, I updated attached scripts.
Made them smaller to narrow down the problem.
I agree with all your concerns.
Join on a function, TRIM, etc. - bad ideas.
The problem is.
My hands...
November 20, 2015 at 12:59 pm
Missing Index is only suggested in IDS INSERT plan.
It runs fast anyway. Problem is with GMS2 INSERT query.
There are no suggestions in GMS2 INSERT plan.
i tried this index before. No...
November 19, 2015 at 8:43 pm
What a surprise!
As soon as I remove DISTINCT from GMS2 INSERT (second insert into temp table)
it runs 10 seconds !
And it inserts 20,955 rows.
How DISTINCT can increase execution time from...
November 19, 2015 at 8:32 pm
Luis,
After I analyzed the next slow block (let's call it "GMS2 INSERT"),
I shifted my focus to much bigger issue (in my opinion).
It is very similar to my original query I...
November 17, 2015 at 12:25 pm
Luis,
So what is the solution
for
The estimated row counts are way off
UPDATE STATISTICS ?
November 17, 2015 at 11:53 am
Luis,
So what should I do about
". . . The estimated row counts are way off, but I'm not sure if they're like that from the non-equi joins.."
November 17, 2015 at 11:07 am
Hello Luis,
"....No, I'm just saying that if it's a cross join, you should write it as such..."
Do you mean you would lie to see
SELECT .....
FROM
a
CROSS JOIN
b
style ?
November 17, 2015 at 10:34 am
Luis,
Indexes are there.
I didn't notice DDL script did not generate index info..
I re-attached new DDL
November 16, 2015 at 9:20 am
Added DDL for two problematical tables...
S_CLIENT_SHARED
S_CLIENT_ACCOUNT_ASSOCIATION_SHARED
November 13, 2015 at 1:26 pm
Thanks Luis.
Without DISTINCT, row count is actually 20 billion something.
Maybe that's what Estimated Row counts show ?
To me if without DISTINCT query returns 20 billion records from 80 million...
November 13, 2015 at 1:18 pm
Thanks Luis.
So you insist CROSS JOIN is a bottleneck.. I guess.
I actually did a test.
I removed JOIN ON (1=1).
But the execution time did not change at all...
Luis,
I didn't understand this...
November 13, 2015 at 11:55 am
regarding
ON (1=1)
after all maybe it's not a big deal because LAST_ANNUAL table
is only one row (always).
so it's not really a CROSS JOIN.
November 12, 2015 at 6:11 pm
Original query:
SELECT DISTINCT
ACCOUNT_SHARED.SOURCE_CODE
,ACCOUNT_SHARED.ACCOUNT_IDENTIFIER
INTO #COMMON_I_SS_ARRANGEMENT_LOCATION_ADDR_IDS_CURRENT_VALID_ARRANGEMENT
FROM
(SELECT MAX(DATA_SET.BUS_PROC_DATE)...
November 12, 2015 at 5:53 pm
Folks,
I just discovered an interesting thing.
The original query uses DISTINCT.
SELECT DISTINCT
ASSOCIATION.SOURCE_CODE, ASSOCIATION.CUSTOMER_NUMBER
. . . . . . .
Without DISTINCT
it returns 1.8 billion records !!
With DISTINCT - it returns...
November 12, 2015 at 5:33 pm
Viewing 15 posts - 91 through 105 (of 161 total)