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 TouchToneTommy 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. LarryKDB2

    SUM Problems in AS400

    Hi "edgarv", As an example of GROUP BY, if you have a table employee_skills (empno, fname, lastname, skill_code, skill_date) then you might want to count the skills for each employee and show their names [even though empno would be a good enough "GROUP BY" column: SELECT empno, fname...
  2. LarryKDB2

    output value of variable

    Hi "RDharmar", I think you should add another "output" parameter to the call list for the s-p and place the string you are curious about into that s-p parameter variable. When you return from the CALL statement, examine that parameter. Larry Kintisch IBM Contractor Instructor for DB2, SQl...
  3. LarryKDB2

    Help With an Update

    Hi "TitleistDBA", I think you want to do this: UPDATE MVXCJDTDVL.MITBAL AS B SET MBWHSL = 'SPECIAL' WHERE EXISTS ( SELECT * FROM MVXCJDTDVL.MITMAS AS M WHERE M.MMITTY IN ( 'wM1','WM2' ,'3LY','3L1') --careful l.c AND M.MMCONO = B.MBCONO AND M.MMITNO = B.MBITNO ); I...
  4. LarryKDB2

    Delete Statistics

    Hi Lucas, No you can't "reset" statistics. You can "UPDATE" statistics such as: UPDATE SYSSTAT.TABLES SET CARD = -1 NPAGES = -1 FPAGES = -1 OVERFLOW = -1 WHERE TABSCHEMA = 'xxx' AND TABNAME = 'yyy' If you have DB2 for Win-Unix installed on a PC, go to...
  5. LarryKDB2

    runstats slows down query

    Lukas, The development of the DB2 optimizers [z/Os, Win-Unix, AS/400] has totaled thousands of person-years. They are cost based, so part of the "smarts" of the optimizer is estimating percentages of the table rows qualifying so that it can estimate how much "work" it will have to do with...
  6. LarryKDB2

    runstats slows down query

    Lukas, Here's my guess. Before the RUNSTATS DB2 probably saw "-1" values in the catalog statistics columns and assumed a smallish table and would do a few table scans. You were using short rows so roughly 250 rows per page meant you had about 4000 pages each. A modern server could probably...
  7. LarryKDB2

    runstats slows down query

    Hi All, Ties is partially correct. You do need to do a RUNSTATS for each table. But with DB2 you also need to do a RUNSTATS for each index. Try that and run your test again and please report back to us the results. Then I'd like you to try another test or two. Drop the index on table R...

Part and Inventory Search

Back
Top