SQL Server Development Bookmark and Share   
 index > SQL Server Integration Services > need better performance than the lookup can provide
 

need better performance than the lookup can provide

I have a datasource with my raw data. I'm using a lookup to avoid doing a left outer join in the raw data query. The lookup and left outer join both are doing a between clause to another table. Here is what the lookup query is firing.

select * from (SELECT intTblGeoIPCountryID, intBeginningIPNo, intEndingIPNo FROM tblGeoIpCountry) as refTable where ? between [refTable].[intBeginningIPNo] and [refTable].[intEndingIPNo]

i've sorted the raw data and that is helping the speed some.. but it's still painfully slow. The tblGeoIPCountry table is not huge.. 100,000 rows. i'm thinking that there must be someway to script this out.. passing in both the raw data and having that go againt a record set of the geo data... but i'm not finding an example that that helps enough for me to muddle my way through. all those calls to to the db in the lookup.. just looking for a different way to do it. I looked at the merge join.. but can't see where i tell it to do the between.. anyway.. what are my options and does anyone have exampels

can anyone help
thanks
shannon
jvcoach23  Tuesday, August 12, 2008 12:42 PM

Not sure why you want to avoid the left outer join - that's probably the fastest way to accomplish this, given that you need to do a Between. The Lookup is really fast when you can use it for equi-joins in cached mode, but as soon as you disable caching, it's speed plummets.

Is there a reason you can't use the left outer join?

jwelch  Wednesday, August 13, 2008 1:19 AM

no.. there is no reason why i couldn't.. i was just looking to see if there was a way to improve on it. I had caching enabled..

thanks for the response

jvcoach23  Wednesday, August 13, 2008 11:58 AM

You can use google to search for other answers

Custom Search

More Threads

• Error Running SQL Agent 2008 Job with Excel Destination
• Cannot convert between unicode and non-unicode string data type
• Executing a .exe on another server us windows authenication
• Derived column based on result of Oracle query
• Upload data from SSIS to a SharePoint List works from VS2005 but doesn't from SQL Job
• Possible Solution?
• Using SSIS to make an HTTP Request
• AcquireConnection(txn) ???
• Using Configurations Class within Script Task
• How to specify a special character as a row delimiter in the flat file connection manager?