Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-09-11T10:54:10Z by vakkila
trianugraha
trianugraha
15 Posts
ACCEPTED ANSWER

Pinned topic Deleting records from table

‏2013-07-29T07:11:27Z |

Hi,

We have a soliddb 6.5 installation with hotstandby.

We need to delete all records from an on-disk table in production server.

Which is faster and less impact on server performance, drop the table then recreate the table or just  truncate the table ?

The table has about 2.2 billion rows, and currently no active transaction is using the table for writing or reading.

 

Thanks.

  • vakkila
    vakkila
    7 Posts
    ACCEPTED ANSWER

    Re: Deleting records from table

    ‏2013-09-11T10:54:10Z  in response to trianugraha

    Hi,

    The DROP TABLE and TRUNCATE TABLE operations are practically the same from performance perspective.

    However, if you use DROP TABLE and then recreate the table, you need to regrant access right to the table.

    -katriina