I am running a query which fetches first 500 rows and it takes more than 80 minutes to complete. The cost of this query is 2.5 million timerons. When I modify the query and run it again the cost of the new query is 40 million timerons but this one finishes in 1 minute and gets me the same result set.
The first query uses an Order By clause in an inner query to get me top first row. The modified one uses a max() function in the inner...
User Profile
Collapse
-
DB2 Query cost on DB2 9.5 on AIX
-
DB2 instances in SDLC
Hi,
I am the dba maintaining db2(8.2) databases in an AIX(5.3) environment. We follow the SDLC process for promoting code changes through different regions like Development,Tes t ..Production for every release.
Recently I have been asked about the possibility of maintaining multiple releases parallely and how it could be done from the DB2 perspective. Each release shd be independent of the other. Does anybody here have a similar... -
Serge or Knut I value your opinion a lot on this issue. Would appreciate yr input.
Thx... -
Db2 Explain weird results
I have a query with date and the days function around it as shown.
I rewrote the query removing the days function. The explain shows a reduced cost biut it runs slower than the original query. Can some one explain why it is so.
I am on AIX 5 and DB2 8.2
original query
SELECT count(*)
FROM doc1 d1
INNER JOIN doc2 d2 on (D1.doc_ID = D2.doc_ID)
INNER JOIN doc3 d3 ON (D1.doc_ID... -
DB2 update using CTE
Hi,
I have to do an update using a query which uses CTE .
Could any body please tell me how I can do an update.
I am unable to update if I replace the final select with an update one.
Thanks in advance
Jay.
No activity results to display
Show More
Leave a comment: