Hi Ed, first of all thanks for being interested in MonetDB ;-) A delete of all BUNs in a BAT (i.e., "bat("bat_name").delete();") should actually work "instantly", at least for the BATs with simple types ("atoms) like INT, OID, TIMESTAMP. For complex types such as BLOB, the delete might be more expensive, due to the internal management of such atoms. Moreover, a sequence of deletions of single BUNs ("bat("bat_name").delete(head_value);", "bat("bat_name").delete(head_value, tail_value);") will usually be more expensive than a deletion of all BUNs at once, but even then I don't expect more than an hour for 250k BUNs... Hence, could you please provide us with the following additional information: - Do you indeed delete all BUNs at once, i.e., using delete() with no other parameter than the BAT? - Do the deletes on all BATs take that long, or is it only the delete on the BLOB BAT, while the others work "instantly" as expected? - How big is each of your BLOBs (on average)? - Are your BATs persistent or transient? These information should help us to better analyse your problem. It would be perfect, if you could even provide us with the scripts that you use, so that we could replay your scenario. Regards from A'dam, Stefan
Howdy!
I'm taking some time to see what MonetDB is all about, and I have some questions re performance.
I created 6 BATs (basically BAT[LNG, X] where X = INT, OID, TIMESTAMP, BLOB) to test. I loaded up about 250k rows (loading was quite reasonable, even though I was using the Perl interface to do it one row at a time). I am currently trying to delete the BUNs by doing a series of "bat("bat_name").delete();", and it is just taking forever (currently at over an hour!!). I/O is extremely minimal, CPU is nailed to 100% (this is running the latest release candidate off of sourceforge on a Linux 2.6 Gentoo system).
Questions: Should delete be so slow? Is there a dependency between tables that is somehow forcing an N^2 or N^3 algorithm to run? Is there an equivalent to "truncate" other than destroy() and recreate?
Regards! Ed
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |