View previous topic :: View next topic |
Author |
Message |
deepa12 Beginner
Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
|
Posted: Tue Jul 05, 2005 4:44 am Post subject: empty a db2 table |
|
|
What is the optimised way to delete all rows in a db2 table
isntead of using delete from table name
1 method i can think of is load an empty dsn extract
ls help as soon as possible
Thanks & rgs
deepa _________________ deepa |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Jul 05, 2005 6:01 am Post subject: |
|
|
deepa12,
A LOAD DATA REPLACE LOG NO with a dummy DSN will be more efficient way of emptying a table rather than using an utility.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
deepa12 Beginner
Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
|
Posted: Tue Jul 05, 2005 7:50 am Post subject: |
|
|
Thanks a lot
deepa _________________ deepa |
|
Back to top |
|
 |
videlord Beginner
Joined: 09 Dec 2004 Posts: 147 Topics: 19
|
Posted: Wed Jul 06, 2005 10:41 am Post subject: |
|
|
Be careful of using LOAD to empty table.
If more than 1 table in the tablespace, then all tables in the tablaspace would be emptied. |
|
Back to top |
|
 |
deepa12 Beginner
Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
|
Posted: Thu Jul 07, 2005 12:29 am Post subject: |
|
|
Hi
Thanks... yes. i will ensure that it is a segmented table space
rgs
deepa _________________ deepa |
|
Back to top |
|
 |
videlord Beginner
Joined: 09 Dec 2004 Posts: 147 Topics: 19
|
Posted: Thu Jul 07, 2005 4:14 am Post subject: |
|
|
Segment tablespace is not 1 table/tablespace,.
1 page of segment tablespace can contain data only from one table.
It's permited to put several tables in one segment tablespace. |
|
Back to top |
|
 |
deepa12 Beginner
Joined: 05 Apr 2005 Posts: 131 Topics: 64 Location: chennai
|
Posted: Thu Jul 07, 2005 10:46 pm Post subject: |
|
|
Hi
Am very sorry... I dont understand
I have always read that simple table space can have many tables
And segmented tablespace can have only 1 table.
So even segmented tablespace can have more than 1 table is it? _________________ deepa |
|
Back to top |
|
 |
Manas Biswal Intermediate

Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
|
Back to top |
|
 |
|
|