Let?s say you have 100,000 records and you want to delete
95,000 at a time and keep only 5 thousand. But in local
memory you don?t have enough space for 95,000 records. What
do you do in this case? How do you delete without any
problem with time and performance?

Answers were Sorted based on User's Feedback



Let?s say you have 100,000 records and you want to delete 95,000 at a time and keep only 5 thousand..

Answer / manjeet

First select the 5000 records u want to keep.. put it in
memory.. then delete the entire table.. and then put this
5000 record table in place

Is This Answer Correct ?    8 Yes 1 No

Let?s say you have 100,000 records and you want to delete 95,000 at a time and keep only 5 thousand..

Answer / pankaj gupta

First create a table using select statement with 5000 records u want to keep.. put it in memory.. then drop/truncate (not delete, that is the basic problem) the entire table.. and then put this 5000 record table in place

Is This Answer Correct ?    2 Yes 0 No

Let?s say you have 100,000 records and you want to delete 95,000 at a time and keep only 5 thousand..

Answer / java

Do the batch delete.
ie Delete the set of records in loop and commit the transaction

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Database Management Interview Questions

Can you explain insert, update and delete query?

0 Answers  


What are procedures in dbms?

0 Answers  


Explain atomicity and aggregation?

0 Answers  


What are the ways to controlling cursor behavior?

0 Answers  


What are 3 types of databases?

0 Answers  






What is the difference between star flake and snow flake schema?

0 Answers  


Tell me about view, sequence and index in DBMS.

0 Answers   Honeywell, Zomato,


What is domain in dbms?

0 Answers  


What are the disadvantages of a database?

0 Answers  


RDBMS file system can be defined as

0 Answers   3i Infotech,


1)what is the difference between view and materilized view? 2)what is the difference between delete and truncate? 3)what is the difference between migration and upgration? 4)what is the difference between RMAN HOT BACKUP and normal hot backup?

2 Answers   3i Infotech,


In DBMS, what are the two integrity rules used?

0 Answers   TCS,


Categories