Posts

Showing posts with the label improve performance

Table partitions, improve performance

Image
Sometimes there is a table in your database that has a low performance, maybe it is big and contains a lot of historical old data, or maybe a lot of queries are running against this table. Is time to think about Oracle Table Partitioning... I´m going to use Online Redefinition method and RANGE partitioning which is good for historical tables, but you can do same for RANGE or LIST partitioning 1-Online Redefinition: Fisrt, we are going to extract hr.test_table DDL . TEST_TABLE is a table that contains 5000 rows stored in tablespace USERS SQL> set long 3000 SQL> set pages 200 SQL> set linesize 190 SQL> SELECT DBMS_METADATA.GET_DDL('TABLE','TEST_TABLE', 'HR') FROM dual; DBMS_METADATA.GET_DDL('TABLE','TEST_TABLE','HR') -------------------------------------------------------------------------------- CREATE TABLE "HR"."TEST_TABLE" ( "ID" NUMBER, "SMALL_NUMBER" N...