Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Where the count column is stored, the more expensive the cpu is later.

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The best field order (conclusion: the later columns have more access to CPU)

Validation script 1 (construct tables and data first)

SET SERVEROUTPUT ON

SET ECHO ON

-construct a table T with 25 fields

DROP TABLE t

DECLARE

L_sql VARCHAR2 (32767)

BEGIN

L_sql: = 'CREATE TABLE t ('

FOR i IN 1..25

LOOP

L_sql: = l_sql | |'n' | | I | | 'NUMBER,'

END LOOP

L_sql: = l_sql | | 'pad VARCHAR2 (1000)) PCTFREE 10'

EXECUTE IMMEDIATE l_sql

END

/

-populate the record and this table T

DECLARE

L_sql VARCHAR2 (32767)

BEGIN

L_sql: = 'INSERT INTO t SELECT'

FOR i IN 1..25

LOOP

L_sql: = l_sql | | '0jue'

END LOOP

L_sql: = l_sql | | 'NULL FROM dual CONNECT BY level

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

  • Mybatis bulk insert (Oracle)

    Configuration file (Oracle):

    © 2024 shulou.com SLNews company. All rights reserved.

    12
    Report