Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7888265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:47:21+00:00 2026-06-03T05:47:21+00:00

I have a stored procedure which uses a view. The stored procedure accepts various

  • 0

I have a stored procedure which uses a view. The stored procedure accepts various parameters.

I have tried:

SELECT 
    COUNT(v.CampaignID) as RecordCount
FROM 
    VW_Results_ValueRank_2010_12_22_NEW V                        
INNER JOIN 
    ResultTopic ON V.ResultID = ResultTopic.ResultId    
INNER JOIN 
    CampaignTopic on ResultTopic.topicid = CampaignTopic.topicid         
WHERE 
    v.CampaignID = 37                        
    AND v.CreateDate BETWEEN 'May  3 2011  8:25PM' AND 'May  3 2012  8:25PM'                        
    AND v.SourceDate BETWEEN DATEADD(d,-3,'May  3 2011  8:25PM') AND 'May  3 2012  8:25PM' 
    AND (LEFT(Title, 80) LIKE '%google%' OR Domain LIKE '%google%' OR LEFT([Text], 300) LIKE '%google%')

It returns 2016 records but takes 40-50 sec, can I decrease this time to 5-10 sec. Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:47:22+00:00Added an answer on June 3, 2026 at 5:47 am

    You can check for missed index by looking at execution plan and create them.

    If all indexex are there and no index can be create on table then you can create index view for CreateDate , SourceDate and other columns in where clause.

    refer this link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a messy stored procedure which uses dynamic sql. I can debug it
I have a stored procedure which basically does something like select top 1 expiryDate,
I have a stored procedure which uses the IN clause. In my ASP.NET application,
I have a stored procedure which uses a FOR XML statement at the end
I have a stored procedure that uses a view to pull 6 averages. The
I have the following C code which uses a stored procedure to insert 2
I have Visual Studio .Net project which uses ADO connection to call stored procedure
I have a problem with an application which uses the same stored procedure over
I've an existing stored procedure SP1 which is simple select from a table. It's
I have a gridview which uses a stored procedure with session[UserName] as a parameter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.