|
-
Jun 23rd, 2006, 03:37 PM
#1
Thread Starter
Junior Member
Massive Delete
MSACESS 2000
FORM
Problem: I have two tables one which has approx 1 million records(tbl1) and another which has approx 400,000(tbl2). I am trying to remove entries in tbl1 that dont have a corresponding value in tbl2. I have tryed doing a sub query(DELETE FROM tbl1 where field1 NOT IN(select field1 from tbl2) but the system just freezes and doesnt actually delete anything.
I have come up with the idea that i can use two seperate loops and two recordsets to accomplish this but i need a way to stop the system from freeze while im doing this neideas?
-
Jun 23rd, 2006, 08:30 PM
#2
Re: Massive Delete
you have aloot of records in your tables so it will be a strain on the system no matter what. It will depend upon your system resources but doing a subquery will take its toll.
Is this a one time operation or is it a maintenance service that you will be running often?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 23rd, 2006, 08:34 PM
#3
Thread Starter
Junior Member
Re: Massive Delete
well it will only be done every couple years cuz its like 3 years data im trying to remove from a fresh copy and the sub query just freezes and does nothing is there neother method of doing in to fix this problem
BTW my sys at work is a P4 2.8 GHz w/ 768MB ram and a 1gb swap
-
Jun 23rd, 2006, 08:37 PM
#4
Re: Massive Delete
When it freezes its actually doing stuff but how long did you let it process?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 23rd, 2006, 08:42 PM
#5
Thread Starter
Junior Member
Re: Massive Delete
well it shows 1 bar then it will sit there for about 2 or 3 hours doin nothin the bar wont move nothin it will just go unresponsive
-
Jun 23rd, 2006, 09:13 PM
#6
Re: Massive Delete
Yes, that is plenty of time to at least see it move a couple of bar segments.
What if you changed the query to do a select into instead of a delete. Then you will end up with a table of just the needed records. Then delete the entire original table.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 23rd, 2006, 10:00 PM
#7
Thread Starter
Junior Member
Re: Massive Delete
I have manage to get a select to work with a left join but that wont work on a delete, and the select sub query still wont work
-
Jun 24th, 2006, 12:49 AM
#8
Re: Massive Delete
No, I mean couldnt you do a select into where it will pull at the needed records into a new table. Then delete the previous table.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|