473,320 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

dropped a not null column from a table, error while running stats

Hi,

I dropped a not null column from a table.
After that i reorganized the table.
However, an update statement is giving error like
"(Reason "column number out of range".) SQLSTATE=58004"

So i ran stats on the table like
"RUNSTATS ON TABLE <SCHEMA.TABNAME>"

However, it gives error(warning) like
SQL2314W Some statistics are in an inconsistent state. The newly
collected
"TABLE" statistics are inconsistent with the existing "INDEX"
statistics.
SQLSTATE=01650

and i cannot find out how to run stats on indexes.
"RUNSTATS ON INDEX <INDEX_NAME. is not the syntax.

Further, is the problem coming due to this or their could be some
other problem.

Please help as it is urgent.

Thanks

Rahul

Aug 29 '07 #1
2 4832
On Wed, 29 Aug 2007 12:17:57 +0000, Rahul B scribbled:
However, it gives error(warning) like SQL2314W Some statistics are in
an inconsistent state. The newly collected
"TABLE" statistics are inconsistent with the existing "INDEX"
statistics.
SQLSTATE=01650

and i cannot find out how to run stats on indexes. "RUNSTATS ON INDEX
<INDEX_NAME. is not the syntax.
Indeed. A simplified version of the RUNSTATS syntax might look something
like this:

RUNSTATS ON TABLE [schname.tbname] [WITH DISTRIBUTION]
[AND [DETAILED] INDEXES ALL]
[SET PROFILE ONLY]

See the RUNSTATS reference [1] for the full syntax, but what's above is
all I find I need to remember on a daily basis. So, in your case
something like:

RUNSTATS ON TABLE schname.tbname AND INDEXES ALL

ought to do the trick.

[1] http://publib.boulder.ibm.com/infoce...2luw/v9/topic/
com.ibm.db2.udb.admin.doc/doc/r0001980.htm
Cheers,

Dave.
Aug 29 '07 #2
On Aug 29, 6:37 pm, Dave Hughes <d...@waveform.plus.comwrote:
On Wed, 29 Aug 2007 12:17:57 +0000, Rahul B scribbled:
However, it gives error(warning) like SQL2314W Some statistics are in
an inconsistent state. The newly collected
"TABLE" statistics are inconsistent with the existing "INDEX"
statistics.
SQLSTATE=01650
and i cannot find out how to run stats on indexes. "RUNSTATS ON INDEX
<INDEX_NAME. is not the syntax.

Indeed. A simplified version of the RUNSTATS syntax might look something
like this:

RUNSTATS ON TABLE [schname.tbname] [WITH DISTRIBUTION]
[AND [DETAILED] INDEXES ALL]
[SET PROFILE ONLY]

See the RUNSTATS reference [1] for the full syntax, but what's above is
all I find I need to remember on a daily basis. So, in your case
something like:

RUNSTATS ON TABLE schname.tbname AND INDEXES ALL

ought to do the trick.

[1]http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/
com.ibm.db2.udb.admin.doc/doc/r0001980.htm

Cheers,

Dave.
Thanks a ton, Dave.

That has indeed worked.

Rahul

Aug 29 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: Agoston Bejo | last post by:
I want to enforce such a constraint on a column that would ensure that the values be all unique, but this wouldn't apply to NULL values. (I.e. there may be more than one NULL value in the column.)...
3
by: olanorm | last post by:
I have a query where one or more of the columns returned is a result from a subquery. These columns get their own alias. I want to filter out the rows containing NULL from the subqueries but it...
11
by: Al Murry | last post by:
A Java Batch job running on AIX 4.3.3 talking to another RS6000 running DB2 6.1 was taking 15 min last week. This week it is taking over 6 hours! The job uses 4 tables that have over 5,000,000...
12
by: Philip Sherman | last post by:
I'm trying to copy production statistics to a test database and can't set the column statistics for a VARGRAPHIC column to match what RUNSTATS generated on production. The reason code and some...
2
by: mike.usenet | last post by:
Hi, I'm new to DB2, but am relatively familiar with databases, and I've run into something I don't fully understand. I created a table tab4, then, after the fact, altered the table so that one...
3
by: Rajesh Kumar Mallah | last post by:
Hi, Looks like alter table does not tells about the indexes it dropped PG version: 7.4.3 Regds mallah.
7
by: am72de | last post by:
Hi all, I've posted this problem some weeks ago, but noone had a solution. Perhaps now someone could help me. I have the following tables: Create Table T1 ( ID1 int Not Null , ID2 int Not...
0
by: Rahul B | last post by:
Hi, I dropped a not null column from a table. After that i reorganized the table. However, an update statement is giving error like "(Reason "column number out of range".) SQLSTATE=58004" ...
5
by: Rahul Babbar | last post by:
Hi, I am facing an issue here. I had to drop a number of columns (around 20) from a table, which I tried to do all at the same time using the following command. Alter table table_name drop...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.