I faced a problem with some legacy code. I have a log table with several hundred million records. Queries to that table take too long even thought it has an index. I dig this issue down to the column named "count". It seems like because of that name, Oracle doesn't use index data and uses a full table scan. So I tried to rename the column, but it fails. I tried:
ALTER TABLE t RENAME COLUMN count TO search_count;
ORA-00900: invalid SQL statement
ALTER TABLE t RENAME COLUMN "count" TO "search_count";
ORA-00904: "count": invalid identifier (same with any other quotes)
ALTER TABLE t RENAME COLUMN t.count TO t.search_count;
ORA-01748: only simple column names allowed here
Creating a new table and moving data there takes too much time and eventually fails with "can't extend tablespace" error.
Could anyone suggest some other method?
Thanks in advance.