Closed

SQL Query tuni ng

This project received 31 bids from talented freelancers with an average bid price of $34 USD.

Get free quotes for a project like this
Project Budget
$10 - $30 USD
Total Bids
31
Project Description

Hi, I need someone to optimize below SQL Query. This is run against a large database. The cross join hurts so do the CHARINDEX AND CONVERT.

SELECT * FROM bank_import AS A4

INNER JOIN

(

SELECT [url removed, login to view] AS ImportID, [url removed, login to view], substring([url removed, login to view], 1, 1) As Location, [url removed, login to view] AS BankArchived,

[url removed, login to view] AS EnrollID, [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view],

[url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view] AS StudentID

FROM students

INNER JOIN students_enroll ON [url removed, login to view] = [url removed, login to view]

CROSS JOIN bank_import

WHERE (((CHARINDEX(CONVERT (VARCHAR, [url removed, login to view]),[url removed, login to view]) > 0))

AND ((CHARINDEX(CONVERT (VARCHAR, [url removed, login to view]),[url removed, login to view]) > 0)) OR ((CHARINDEX(CONVERT (VARCHAR, [url removed, login to view]), [url removed, login to view]) > 0)))

AND bank_import.IsArchived=0 AND (students_enroll.CycleID=19 OR students_enroll.CycleID=18)

)

As A5 ON [url removed, login to view] = [url removed, login to view] WHERE A4.MatchFound=0 AND A4.DateReleve='2014-01-29'

Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online