speed up query

Results 1 to 2 of 2

Thread: speed up query

  1. #1
    PeteV Guest

    Default speed up query

    I have a query from my ASP page to SQL server where the<BR>user selects some paramters and then some codes (up to 100)<BR>are passed to the database:<BR>select well_name, state_well, owner_name, watlev, meas_date<BR>from wells, owners, watlev<BR>where ....<BR>owner_name like (value selected by user)<BR>and well_code in ( up to 100 codes)<BR><BR>would I be better off creating a temp table and then doing a join on the well_codes rather than the in () statement ??<BR><BR>would a stored procedure speed things up ??<BR><BR><BR>Thanks<BR><BR>Pete

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: speed up query

    A sp would definitely speed up things<BR><BR>BUT the like clause is always SLOW<BR><BR>you could even think of trying as a test individual selects and insert the select into a tmep table and selct from there...Now how much faster this will be i do not know...but it is definitely worth a try

Posting Permissions

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