Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Indexes gone bad

GinolaMar 4 2018 — edited Mar 5 2018

Hi,

We have a couple of tables that are quite large (~200million rows), and each night we do delete and inserts of about 500k rows.

And after each insert we do rebuild index on all indexes on the table.

A lot of our batch jobs then run against these tables.

But for a couple of days now, the CBO has started doing a weird behaviour. On queries it used to do FTS, it now uses indexes and vice versa. Some of the indexes are obviously not that good to use since we are experiencing exceptional bad performance.

What can have happened? Could the table gone bad? And the indexes then look good for the CBO?

Thanks in advance!

Comments

InoL

That is not how APEX works. When you upload a csv file, you can either use the Data Load Wizard or your own process to parse and load the data in the file using APEX_DATA_PARSER.
Oracle Application Express 18: Creating a Data Load Wizard for Your Application (0 Bytes)
APEX_DATA_PARSER : Convert simple CSV, JSON, XML and XLSX data to rows and columns. (0 Bytes)
SQLLoader would typically run on the database server to load a file on the database server. I don't think that is what you are looking for.

User_C0JD6

SQLLoader would typically run on the database server to load a file on the database server. I don't think that is what you are looking for.

this is what i was after tbh. Apex accepting the CSV file as an upload to a director and sql loader getting kicked off. But I’m guessing it will have to be a combination of files uploaded to a directory and a continuous daemon checking for new files and the daemon kicking off the sql loader

AndyH

If you don't want to process the file (using APEX_DATA_PARSER, your own CSV processing, etc.) you could write the uploaded blob to the database file system and then access it as an external table.

User_C0JD6

Thank you Andy and Inoll

InoL

Apex accepting the CSV file as an upload to a director and sql loader getting kicked off.
That seems a bit strange: upload the file to the database (that is what APEX does), write the file to a database directory and then load the file back into the database. I think it is so much easier to skip the part of writing and reading the file from a database directory.
If you really want to do that, I agree with AndyH: access it as an external table, don't use SQLLoader.

1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 2 2018
Added on Mar 4 2018
20 comments
2,857 views