Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / June 2003



Tip: Looking for answers? Try searching our database.

external list delete...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christian Lerche - 30 Jun 2003 16:59 GMT
Hello,

my problem is:
I have a list with 8000 rows (CSV)
I use this list to delete a row in a sql-database
that stores 2.000.000 rows..
(with command >> DELETE FROM XXX WHERE ID = 0000)

this way is very slow (a few second every 100 rows)
so my question: Is there another faster way to delete
rows ??

thanks
Val Mazur - 30 Jun 2003 17:57 GMT
Hi,

First of all check if you have index built on ID field. If you do not have
index, then the whole process will be slow, because database engine will
scan rows to find matching one. Also you could optimize it using IN clause
to delete batch of records in one shot

DELETE FROM XXX WHERE ID IN ( 0, 1, 2,3, 4...)

--
Val Mazur
Microsoft MVP

> Hello,
>
[quoted text clipped - 9 lines]
>
> thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.