Differential backup completed, bvfs-update is running now ...

The DELETE FROM PathVisibility query is VERY, VERY slow, but bulk deletes in MySQL have always been slow.

There is a technique that optimizes bulk delete speeds, but it adds significant complexity. It goes basically like this:


CREATE TEMPORARY TABLE T (id INT UNSIGNED PRIMARY KEY);

INSERT INTO T
SELECT <row IDs you want to delete> FROM <target table>;

REPEAT
   DELETE target FROM target
   JOIN T on target.id = T.id
   ORDER BY t.id DESC
   LIMIT 10000;
   UNTIL ROW_COUNT() < 10000
END REPEAT;

DROP TEMPORARY TABLE T;


--
  Phil Stracchino
  Fenian House Publishing
  [email protected]
  [email protected]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958



_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to