All Questions
6
questions
1
vote
1
answer
2k
views
SQL Query with lower costs runs slower than queries with way higher cost
I ran the execution plan on a SQL query on a DB2 database for two queries. The first query has a cost of about 380000. After modifying the query by replacing some inner joins with subqueries, the cost ...
0
votes
0
answers
54
views
Ship in access plan has very high cost
I got this query:
select
count(1) as total
from
Document
join
ClaimDocument on ClaimDocument.documentId = Document.documentId
where
(Document.latestChangeLogonUserId = 1) and
...
1
vote
0
answers
424
views
Remote insert over DB2 linked-server results in Table / Eager Spool in the execution plan
When I execute the SQL below I can see that all the records are being buffered in TempDb prior to the insert into the DB2 table. This kills performance with large volumes.
The execution plan suggests ...
0
votes
0
answers
199
views
How to resolve the following exception while excuting explain plan in DB2
I am executing explain plan for query in DB2 database. I am getting following error. I am clue less about the issue.
Can some body help me how to resolve this issue?
Below is the error message
"...
5
votes
7
answers
12k
views
How to efficiently retrieve data in one to many relationships
I am running into an issue where I have a need to run a Query which should get some rows from a main table, and have an indicator if the key of the main table exists in a subtable (relation one to ...
-1
votes
1
answer
266
views
DB2 Plan table method
Which of the method value given in a plan table row is better when a join is involved in tables?
method=1, nested loop join
method=2, merge scan join
method=4, hybrid join