Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010

    Unanswered: Compare partial string between tables

    I am using this the SQL to compare the Partial content of two tables. The isssue is it's very slow. To perform a variation of query 6 time. It takes about 2 to 3 hr for the query to run. I am looking at 12 hr to proccess the 80K records

    can some one point me in the direction of a faster solution.


    SELECT Master_Address_List.ECI, Master_Address_List.[CLIENT NAME], [Deposite-Omni_Master].[Address Line 1]
    FROM Master_Address_List INNER JOIN [Deposite-Omni_Master] ON InSTR(Master_Address_List.[CLIENT NAME],[Deposite-Omni_Master].[Address Line 1])
    GROUP BY Master_Address_List.ECI, Master_Address_List.[CLIENT NAME], [Deposite-Omni_Master].[Address Line 1];

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    Using one or several intermediate table(s) (properly indexed if possible) to segment the process could perhaps help improving the speed, but probably not much.

    What you're doing is very unusual. Are you sure of the logic in the JOIN? Instr returns a numeric value that indicates the position of a substring within a string, not the substring itself.

    I can't actually imagine what you're trying to achieve, but if this is really necessary I suspect that your database is not normalized.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts