I am a SQL guy, but am doing a stint in ORACLE land. Nothing wrong w/ expanding one's boundaries....
I have been given a view to a table. I do have permission to delete from that view.
Delete from vwGregsViewOnTable where SEQ = 12345
this takes 12 minutes. There are ~20M rows in the table, but 12 minutes? I got a DBA involved and they confirmed that I am doing a table scan.
We scripted the table and that follows here in part...
CREATE TABLE SYT_SYALERTQUEUE
(
IDRECMAIN VARCHAR2(32 BYTE),
IDRECPARENT VARCHAR2(32 BYTE),
IDREC VARCHAR2(32 BYTE),
SEQ NUMBER(10),
.
.
.
CREATE INDEX SYNDX00000000000000000002277 ON SYT_SYALERTQUEUE
(SEQ)
LOGGING
TABLESPACE WV90NDX
It does appear that there is an index on the column I was told I should use.
in this case, vwGregsViewOnTable is the view on SYT_SYALERTQUEUE
My question is - how can I coax ORACLE into using the index. It doesnt seem to want to by default.