How to Define Statistics for a table

Database

How to Define Statistics for a table

Hi frndz,

I have to replicate the whole table from one database to another database.

I have created the table and copied the data as it is. Actual problem is that one datastage job is trying to collect the statistics of the table while the statistics are not defined for the table in the new database though they exist in old database.

Now I am trying to define the statistics on to the table in new database in the same way as how it is defined for same table in old database.

I need your kind help to achieve this. It would be of great help if anybody suggests. Please let me know if I am not clear at any point.
2 REPLIES
Fan

Re: How to Define Statistics for a table

Use help statistcs on to see what columns need to have stats collected on them. Then collect statistics on them manually. The next time you run your job it will collect them automatically

Re: How to Define Statistics for a table

You could always copy the table from one database to another complete with data and statistics.

CREATE TABLE database1.tablename AS database2.tablename WITH DATA AND STATISTICS;