SQL - Delete table with 372 million rows starting from first row

hdraven

I have a table with 372 million rows, I want to delete old rows starting from the first ones without blocking the DB. How can I reach that?

The table have

id | memberid | type |      timeStamp          | message |
1     123        10    2014-03-26 13:17:02.000    text

UPDATE:

I deleted about 30 GB of Space in DB, but my DISC is ON 6gb space yet.. Any suggestion to get that free space?

Thank you in advance!

Akshey Bhat
select 1;
while(@@ROWCOUNT > 0)
begin
   WAITFOR DELAY '00:00:10';
   delete top(10) from tab  where <your-condition>;

end

delete in chunks using above sql

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

MySQL update every single row from a 3 million row table

From Dev

Derby DB SQL, Select Rows starting from row number

From Dev

Delete all data rows from an Excel table (apart from the first)

From Dev

Delete limited n rows from oracle sql table

From Dev

Delete rows from table

From Dev

How to quickly delete a column from a table containing 600 million rows?

From Dev

How to delete unknown number of rows from sql table

From Dev

Delete rows from a table without checking that they exist first

From Dev

SQL Delete rows based on query from same table?

From Dev

using jQuery drag + drop to delete a row from an SQL table

From Dev

Delete a row from Parse Table

From Dev

how to retrieve all rows from a table starting from the n'th row

From Dev

Get m Rows starting from nth row in dynamic MySql table

From Dev

SQL Server previous and next date from a million row table

From Dev

PHP fputcsv not Outputting First Row From SQL Query (Outputs all Other Rows After the First Row)

From Dev

BigQuery SQL delete rows from a target table based on a condition

From Dev

Delete rows from table using JOIN - SQL Server

From Dev

BigQuery SQL delete rows from a target table based on a condition

From Dev

Delete X rows from table

From Dev

Cannot delete rows from a table SQL

From Dev

SQL Delete rows based on query from same table?

From Dev

How to delete all but first two rows in a table (headers is the first row)

From Dev

Delete all but first 100 rows in table MYSQL

From Dev

PHP fputcsv not Outputting First Row From SQL Query (Outputs all Other Rows After the First Row)

From Dev

Optimizing SQL query on table of 10 million rows: neverending query

From Dev

SQL - Delete row based on number of rows in another table

From Dev

SQL Hide/Show rows based on row count from another table

From Dev

Fetch single row from two rows of a table with join in SQL Server

From Dev

How to delete values from first table by using name of the second sql

Related Related

  1. 1

    MySQL update every single row from a 3 million row table

  2. 2

    Derby DB SQL, Select Rows starting from row number

  3. 3

    Delete all data rows from an Excel table (apart from the first)

  4. 4

    Delete limited n rows from oracle sql table

  5. 5

    Delete rows from table

  6. 6

    How to quickly delete a column from a table containing 600 million rows?

  7. 7

    How to delete unknown number of rows from sql table

  8. 8

    Delete rows from a table without checking that they exist first

  9. 9

    SQL Delete rows based on query from same table?

  10. 10

    using jQuery drag + drop to delete a row from an SQL table

  11. 11

    Delete a row from Parse Table

  12. 12

    how to retrieve all rows from a table starting from the n'th row

  13. 13

    Get m Rows starting from nth row in dynamic MySql table

  14. 14

    SQL Server previous and next date from a million row table

  15. 15

    PHP fputcsv not Outputting First Row From SQL Query (Outputs all Other Rows After the First Row)

  16. 16

    BigQuery SQL delete rows from a target table based on a condition

  17. 17

    Delete rows from table using JOIN - SQL Server

  18. 18

    BigQuery SQL delete rows from a target table based on a condition

  19. 19

    Delete X rows from table

  20. 20

    Cannot delete rows from a table SQL

  21. 21

    SQL Delete rows based on query from same table?

  22. 22

    How to delete all but first two rows in a table (headers is the first row)

  23. 23

    Delete all but first 100 rows in table MYSQL

  24. 24

    PHP fputcsv not Outputting First Row From SQL Query (Outputs all Other Rows After the First Row)

  25. 25

    Optimizing SQL query on table of 10 million rows: neverending query

  26. 26

    SQL - Delete row based on number of rows in another table

  27. 27

    SQL Hide/Show rows based on row count from another table

  28. 28

    Fetch single row from two rows of a table with join in SQL Server

  29. 29

    How to delete values from first table by using name of the second sql

HotTag

Archive