Tags » Partitioning

DDL logging

I was presenting at the UKOUG event in Manchester on Thursday last week (21st April 2016), and one of the sessions I attended was Carl Dudley’s presentation of some New Features in 12c. 404 more words

Oracle

Partitioning - RANGE INTERVAL

1.) Create table:

drop table cmagno.test_pt_int;  
create table cmagno.test_pt_int (
  num number,
  text varchar2(1000),
  dt date
)
PARTITION BY RANGE (dt) INTERVAL (NUMTODSINTERVAL (1, 'DAY'))
( 
   PARTITION p1 VALUES LESS THAN (TO_DATE('08-04-2016', 'DD-MM-YYYY'))
); 

2.) Inserting Data:


declare

i number;
v_dt date;

begin

  for i in 1..100 loop    
      v_dt := trunc(sysdate+i);
      insert into cmagno.test_pt_int 
      values (i,'DATE: ' || to_char(v_dt) ,v_dt);
  end loop;
  commit;

end;
/

3.) Stats:

exec dbms_stats.gather_table_stats('CMAGNO','TEST_PT_INT');

4.) Partitions:

select count(*) 
from dba_tab_partitions 
where table_name='TEST_PT_INT';

            COUNT(*)
--------------------
                 101

1 row selected. 203 more words

wiping out a GPT partition table

I’m assuming that sdb is the disk you are working on.

To just get rid of the gpt:
sudo sgdisk -z /dev/sdb

To get rid of the gpt and mbr:
sudo sgdisk -Z /dev/sdb

Linux

Update to TRUNCATE TABLE in SQL 2016 (partition support)

Continuing my obsession with partitioning I thought I’d write this quick post about a cool change in SQL Server 2016.

This change allows you to truncate an individual partition, instead of having to switch that partition out to another table and then truncate it. 546 more words

Partitioning

Partitioning and filegroup restores

I’ve been playing around with partitioning quite a lot recently and wanted to write a quick post about how it can help you out in a DR situation. 1,001 more words

Partitioning

Updating Tables with Read-Only Partitions

I learned an important thing today. I’ve started partitioning our data warehouse and we’ve moved into our testing phase. The partitions are in place, the archive is read-only and once a month the automated partition maintenance kicks off. 536 more words

Wrong Results

Just in – a post on the Oracle-L mailing lists asks: “Is it a bug if a query returns one answer if you hint a full tablescan and another if you hint an indexed access path?” 536 more words

Oracle