Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 48785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:20:04+00:00 2026-05-10T16:20:04+00:00

This has been an adventure. I started with the looping duplicate query located in

  • 0

This has been an adventure. I started with the looping duplicate query located in my previous question, but each loop would go over all 17 million records, meaning it would take weeks (just running *select count * from MyTable* takes my server 4:30 minutes using MSSQL 2005). I gleamed information from this site and at this post.

And have arrived at the query below. The question is, is this the correct type of query to run on 17 million records for any type of performance? If it isn’t, what is?

SQL QUERY:

DELETE tl_acxiomimport.dbo.tblacxiomlistings WHERE RecordID in  (SELECT RecordID     FROM tl_acxiomimport.dbo.tblacxiomlistings     EXCEPT     SELECT RecordID     FROM (         SELECT RecordID, Rank() over (Partition BY BusinessName, latitude, longitude,           Phone ORDER BY webaddress DESC, caption1 DESC, caption2 DESC ) AS Rank     FROM tl_acxiomimport.dbo.tblacxiomlistings     ) al WHERE Rank = 1) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:20:04+00:00Added an answer on May 10, 2026 at 4:20 pm

    Seeing the QueryPlan would help.

    Is this feasible?

    SELECT m.* into #temp FROM tl_acxiomimport.dbo.tblacxiomlistings m  inner join (SELECT RecordID,                     Rank() over (Partition BY BusinessName,                                               latitude,                                                longitude,                                                          Phone                                   ORDER BY webaddress DESC,                                            caption1 DESC,                                            caption2 DESC ) AS Rank               FROM tl_acxiomimport.dbo.tblacxiomlistings            ) al on (al.RecordID = m.RecordID and al.Rank = 1)  truncate table tl_acxiomimport.dbo.tblacxiomlistings  insert into tl_acxiomimport.dbo.tblacxiomlistings      select * from #temp 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer To stop next clicks from happening, you can use the… May 11, 2026 at 11:06 am
  • added an answer perhaps you want to use after instead of appendTo May 11, 2026 at 11:06 am
  • added an answer assign the return value to a variable? May 11, 2026 at 11:06 am

Related Questions

This has been an adventure. I started with the looping duplicate query located in
A coworker has been struggling with this problem. The desired result is an installable
This has been a problem that I haven't been able to figure out for
This has been driving me crazy for a few days. Why doesn't the following
This has been troubling me for a few years, and was recently exacerbated by
This has been asked before (question no. 308581) , but that particular question and
This has been confusing me for some time. With the advent of UTF-8 as
I'm sure this has been asked before, but I can't find it. What are
I know this has been discussed many times, but I am not sure I
I don't know if this has been discussed. Let's say you are in a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.