Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Db2curiosity

    DB2 not picking up right index for right query - detail below -Pl help

    Rbod, That's what we are also trying by doing RUNSTATS (I have given the exact RUNSTATS systax that we are using ) But its behaving wierd..!! Of course we have lot more columns in Table1 & Temp_Table other than what is used in the query itself... so,what do you think ? shall i collect...
  2. Db2curiosity

    DB2 not picking up right index for right query - detail below -Pl help

    Ans1 ## We dont have DB2ADVIS tool but i tried all the different combinations of cols in the INDEX ,but the QUERY2 is just very much adamant to use only INDEX1 (1,3,9) and running forever... If only i drop INDEX1, its using INDEX2( or others) and running fast as its expected to do. Ans2 ##...
  3. Db2curiosity

    DB2 not picking up right index for right query - detail below -Pl help

    Hi, we are doing the 2 following updates in DB2 8.1,the index meant for 1st update is getting used in 2nd update and making it very slow. ** Table c has 7MM rows. ** Table w has 300K records. ** RUN STATS are Current for both tables. ** REORGCHK on table c has been done and it looks ok /** For...
  4. Db2curiosity

    Prepare Execute is not doing anything but no error message

    The Program is running on UNIX. Which file you are asking about ? Please clarify a little so that i can amswer. Here we are building a sql string ( basically INSERT statement ) dynamically within a CURSOR loop ,storing that within a local variable say v_sql_string within the loop itself...
  5. Db2curiosity

    Prepare Execute is not doing anything but no error message

    Hi, We are encountering a strange situation which using PREPARE and then EXECUTE for a dynamic INSERT statement. The Stored proc is not returning any error but the insert is not happening. We tried running the INSERT statement outside and its doing fine .. do you have any idea why the thing is...
  6. Db2curiosity

    Queries with SELF join is slow,though the PLAN is very good

    Marc, yeah the first one is a great suggestion,though the COST in the db2expln plan doesn't change that much , i can see improvements while actually running the altered query. BUSS_KEY_PART_08 may not contain date always..no we dont get -180, what actually u are meaning by that ? Thanks,
  7. Db2curiosity

    Queries with SELF join is slow,though the PLAN is very good

    Hi, I wrote last week about some costly queries and kind of tuned them by adding a NEW index with all your valuable help. Looks like the story didn't end here. There are another set of queries [which is having SELF JOIN on a 25 MM table]Its picking up the NEW index,showing improvement in...
  8. Db2curiosity

    DB2 Performance is slow /spooky even with Index usage - help

    Greg and others, I'm on UNIX... I tried looking for Db2advis -help like you find the commands for Db2expln -help.. But its not coming up.. U are rgt..we would have been here without much effort on last Thursday itself if Db2advis were there.. Yep,the queries are are showing decent PLAN costs...
  9. Db2curiosity

    DB2 Performance is slow /spooky even with Index usage - help

    Marc/Ties, You may be right,it looks like Db2 8 versions support indexing even on <> columns.I mean if you include the column in the index get picked and helps cutting costs. Earlier i made the new index as follows :- SOURCE_SYSTEM_NM LOAD_PROCESS_KEY_PART_01 BUSINESS_KEY_PART_04...
  10. Db2curiosity

    DB2 Performance is slow /spooky even with Index usage - help

    Hi Marc, Yep,DELETE_DT is Nullable and its used in some other queries like " and b.DELETE_DT is null "... I was thinking of a index on the following..The reason i excluded LOAD_PROCESS_KEY_PART_02 is because in most of the queries its used as <> , so would it help if we add that in the INDEX...
  11. Db2curiosity

    DB2 Performance is slow /spooky even with Index usage - help

    Unfortunately that's how the current business logic is built..!! do you have any alternatives in mind for those clauses, of course the result should not alter.
  12. Db2curiosity

    DB2 Performance is slow /spooky even with Index usage - help

    By the way, we dont have Db2advis,so i cant really check that tools advise.. But i'm thinking of a different INDEX ... let me know if creating a different index instead of the one its using can make a difference... Thanks
  13. Db2curiosity

    DB2 Performance is slow /spooky even with Index usage - help

    The query plan(COST) is same as earlier even after removing "NOT EQUAL" clause. In the Production environment they have RUN STATS scheduled but REORG is done in certain intervals and its for sure the tables are monitored for Fragmentation etc. Let me send you the Tables,Query INDEX its using...
  14. Db2curiosity

    DB2 Performance is slow /spooky even with Index usage - help

    Greg, First thx for ur reply... i did do the RUNSTATS... The spooky thing is that the query is taking 20 mins though the db2expln is showing that its using INDEX !! is it like i have to find a better index through db2advis? the tables are having 16 MM and 200k rows respectively so there is...
  15. Db2curiosity

    DB2 Performance is slow /spooky even with Index usage - help

    Hi, 1> i have a composite index I1 on column A,B,C,D,E out of which A,B is present in where clause and column D is also present in where clause but with a <> operator. The query plan is showing INDEX I is being used still the query is kind of slow ... any tips for improving? by the way ,i...

Part and Inventory Search

Back
Top