No! That is NOT what we are suggesting. It would be just two SQL statements.
|---------+-------------------------------------------> | | Patrick Burleson | | | <[EMAIL PROTECTED]> | | | Sent by: | | | [EMAIL PROTECTED]| | | ceforge.net | | | | | | | | | 04/08/03 11:44 PM | | | | |---------+-------------------------------------------> >------------------------------------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: RE: [Hibernate] Mass Deletes | >------------------------------------------------------------------------------------------------------------------------------| I got in on this thread late, but if I understand what people are talking about, the select-then-delete model doesn't work well on large datasets. This is one of the drawbacks to Entity Beans for our organization. Trying doing that model for 10K rows and you quickly see how much that extra statement costs you when you can do it in less than a second with a simple delete. Patrick --- Odd Moller <[EMAIL PROTECTED]> wrote: > I don't understand the drawbacks with the select-then-delete alternative. > Doesn't it just mean one additional statement to the database? > > ///Odd Moller > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: den 4 augusti 2003 05:36 > To: [EMAIL PROTECTED] > Subject: [Hibernate] Mass Deletes > > > Many users have asked for > > session.delete("from Foo foo where foo.count=0"); > > to issue a single SQL DELETE. This is certainly not possible for objects > with collections or cascades (though it might not matter if we ignore > Lifecycle callback; not sure). For other classes it is conceptually > possible. > > Now, this is really quite easy to implement - it would take me about 1-2 > hours to do it. > > But my big problem is: how do we know which _loaded_ objects were deleted? > I don't think there is any good way to do this. All we get back from DELETE > is a row count. > > * Do we issue a SELECT beforehand, to fetch the ids ..... and then issue > the delete? > * Do we just disable mass delete for classes which have loaded instances? > * Is it simply not worth it? > > The select-then-delete option doesn't seem particularly better than the > current situation when JDBC batch updates are enabled. The > disable-when-instances-are-loaded option looks like it would work, but only > for some very limited usecases (though it may work for the usecases we are > most interested in). > > > Thoughts? > > > ********************************************************************** > Any personal or sensitive information contained in this email and > attachments must be handled in accordance with the Victorian Information > Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988 > (Commonwealth), as applicable. > > This email, including all attachments, is confidential. If you are not the > intended recipient, you must not disclose, distribute, copy or use the > information contained in this email or attachments. Any confidentiality or > privilege is not waived or lost because this email has been sent to you in > error. If you have received it in error, please let us know by reply > email, delete it from your system and destroy any copies. > ********************************************************************** > > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel ********************************************************************** Any personal or sensitive information contained in this email and attachments must be handled in accordance with the Victorian Information Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988 (Commonwealth), as applicable. This email, including all attachments, is confidential. If you are not the intended recipient, you must not disclose, distribute, copy or use the information contained in this email or attachments. Any confidentiality or privilege is not waived or lost because this email has been sent to you in error. If you have received it in error, please let us know by reply email, delete it from your system and destroy any copies. ********************************************************************** ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel