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

  • SEARCH
  • Home
  • 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 8299743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:16:28+00:00 2026-06-08T16:16:28+00:00

I have 4 views in my MS Sql Server Database which are all quite

  • 0

I have 4 views in my MS Sql Server Database which are all quite fast (less than 2 seconds) and return all less than 50 rows.

BUT when I create a query where I join those 4 views (left outer joins) I get a query which takes almost one minute to finish.

I think the query optimizer is doing a bad job here, is there any way to speed this up. I am tempted to copy each of the 4 views into a table and join them together but this seems like too much of a workaround to me.

(Sidenote: I can’t set any indexes on any tables because the views come from a different database and I am not allowed to change anything there, so this is not an option)

EDIT: I am sorry, but I don’t think posting the sql queries will help. They are quite complex and use around 50 different tables. I cannot post an execution plan either because I don’t have enought access rights to generate an execution plan on some of the databases.

I guess my best solution right now is to generate temporary tables to store the results of each query.

  • 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-08T16:16:30+00:00Added an answer on June 8, 2026 at 4:16 pm

    If you can’t touch indexes, to speed up, you can put results of you 4 queries in 4 temp tables and then join them.

    You can do this in a stored procedure.

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

Sidebar

Related Questions

I have created views on the SQL Server 2005 database and this view is
I have a Windows .net application using SQL Server 2005 Express as database, which
I have a SQL-Server 2008 database and a schema which uses foreign key constraints
I have to SQL Server views being drawn to 2 seperate worksheets as pivot
I currently have this statement in my SQL View (SQL Server 2008 R2) which
I have all my tables, views, triggers in different files (Table1.sql, Table2.sql, View1.sql,...), and
Let's have: $DB an SQL Server database $DBSP1 an SQL Server database containing stored
My database has about 30 views, most of which have a reference to another
We have an application which uses an instance of Sql Server locally for its
I have a table in a SQL Server 2005 Database that is used a

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.