title: LINQ query takes 1600 times longer in Visual Studio than LINQPad
body: <p>I am building a query for a search box in ASP MVC. The query takes 10 milliseconds in LINQPad and 16 seconds in Visual Studio. Is there any way that I can improve the query or the time response for the query?</p>
  
  <pre><code> var queryOracle = (from TS in dbOracle.BI_TYPE_SERVICE
                             join MS in dbOracle.BI_MTR_SRV on TS.BI_ACCT equals MS.BI_ACCT
                             join SL in dbOracle.BI_SRV_LOC on MS.BI_SRV_LOC_NBR equals SL.BI_SRV_LOC_NBR
                             join C in dbOracle.BI_CONSUMER on TS.BI_ACCT equals C.BI_ACCT
                             join P in dbOracle.BI_PERSONAL on C.BI_CUST_NBR equals P.BI_CUST_NBR
                             join STR in dbOracle.BI_SRV_STAT_REF on TS.BI_SRV_STAT_CD equals STR.BI_SRV_STAT_CD
                             where P.BI_ADDR_TYPE != "2B" || P.BI_ADDR_TYPE != "2D" || P.BI_ADDR_TYPE != "FO" || P.BI_ADDR_TYPE != "CC" || P.BI_ADDR_TYPE != "8" || P.BI_ADDR_TYPE != "SE" || P.BI_ADDR_TYPE != "9" || P.BI_ADDR_TYPE != "BD" || P.BI_ADDR_TYPE != "CN" || P.BI_ADDR_TYPE != "CR" || P.BI_ADDR_TYPE != "CS" || P.BI_ADDR_TYPE != "M1" || P.BI_ADDR_TYPE != "M2" || P.BI_ADDR_TYPE != "M3" || P.BI_ADDR_TYPE != "MR"
                             where P.BI_ACCT == 0
                             where P.BI_FORMAT_NAME.StartsWith(term) || SL.BI_ADDR1.StartsWith(term) || MS.BI_MTR_NBR.StartsWith(term) || TS.BI_ACCT.ToString().StartsWith(term)
  
  
                             select new
                             {
                                 LocationID = SL.BI_SRV_MAP_LOC,
                                 MeterNumber = MS.BI_MTR_NBR,
                                 AccountNumber = TS.BI_ACCT,
                                 ServiceStatCD = TS.BI_SRV_STAT_CD,
                                 ServiceStatus = STR.BI_SRV_STAT_DESC,
                                 Name = P.BI_FORMAT_NAME,
                                 ServiceAddr = SL.BI_ADDR1,
                                 ServiceCity = SL.BI_CITY,
                                 CustomerNumber = C.BI_CUST_NBR,
                                 ServiceCNTY = SL.BI_CNTY_CD,
                                 ServiceTOWN = SL.BI_TOWN_CD,
                                 HomeAreaCode = P.BI_HOME_AREA_CD,
                                 HomePhone = P.BI_HOME_PHN,
                                 BusAreaCode = P.BI_BUS_AREA_CD,
                                 BusPhone = P.BI_BUS_PHN,
                                 MobileAreaCode = P.BI_MOBL_AREA_CD,
                                 MobilePhone = P.BI_MOBL_PHN
                             }).AsNoTracking().Take(12).ToList();
  </code></pre>