indexing - Creating index/pk in a huge table is taking too long. I am using Oracle. How do I know if it is going well? -
i have huge table, ~200 million rows. had no index/pk @ all. selects in table (obviously) running slow. decided create pk using 3 columns. did in test environment has smaller version of table , worked charm.
so, before going home did alter table hugetable add constraint pk_hugetable primary key (id1, id2, id3);
i expected run on night, has been on 24 hours , still running.
i know if had kept session id before starting query able track @ v$session_longops. didn't.
is there way check how query going or how long still take?
you should still able query v$session_longops. if run like
select sid, serial#, start_time, sofar, totalwork, time_remaining, message v$session_longops time_remaining > 0
you'll see 1 session started yesterday , other columns should corroborate indications session has done lot of work. message should indicate full scan on hugetable.
Comments
Post a Comment