[Oracle]-[Index]: check data before creating an index, or create an index before inserting data. Problem: 1. Create a new table structure and create an index, import millions or tens of millions of data into the table using insert. 2. Create a new table structure, use isnert to import millions or tens of millions of data into the table, and then create an index. Which of the two is more efficient? Or is it short? I feel that no matter whether you create an index first or later, you need to update the index data when you have data. The problem is that if you have an index, You need to insert data and create an index when you have data. Experiment: 1.3 records, 1. Create a table and an index first, and then insert data, about minutes. 2. Insert data first and then create two indexes. create table xxx as select * from t where 1 <> 1; about 13 seconds, create two indexes for about 26 seconds and 35 seconds. Conclusion: If you create an index before inserting data, you need to modify the index information each time you insert data. The actual situation depends on the business requirements. Some businesses may also require indexes and constraints to verify the data. In this way, you should first create an index. For one-time processing, insert data first and then create an index.