Answer Posted / vasuki🐍
reorganizes the table and its indexes by
rebuilding the index data into unfragmented and contiguous area on the disk.
Normally after a large amount of INSERT, UPDATE, DELETE activities on data tables, we generally need a REORG.
After a table space reorganization the fragments are moved around and clustered,
however the database still utilizes the old statistic to query the data.
So it is recommended to run a RUNSTATS on the table.
This command updates the statistic information.
Besides it makes sure that the DB2 optimizer takes advantage of the refreshed statistic information.
Reorg>>runstats
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?
What is multi row fetch in db2?
SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.
What are catalog tables in db2?
What is nvl in db2?
List some fields from sqlca?
what is a corelated subquerry?
What is the difference between oracle and db2?
What is with ur in db2?
How would you find out the total number of rows in a db2 table?
Which component is responsible for processing sql statements and selecting access paths?
What is the difference between cursor and select statement?
What is a bind in db2?
What is the role of the data page in the db2 database?
What is load utility in db2?