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 6848561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:53:01+00:00 2026-05-27T00:53:01+00:00

This query run alone: SELECT — lots of columns FROM table1 t1 LEFT JOIN

  • 0

This query run alone:

SELECT 
    -- lots of columns 
FROM 
    table1 t1
    LEFT JOIN table2 t2
        ON t2.[userid] = t1.[userid]
    LEFT JOIN table3 t3
        ON t1.[orderid] = t3.[orderid]
    LEFT JOIN table4 t4
        ON t4.[orderitemlicenseid] = t3.[orderitemlicenseid]
    LEFT JOIN table5 t5
        ON t1.[orderid] = t5.[orderid]
    LEFT JOIN table6 t6
        ON t5.[transactionid] = t6.[transactionid]
    LEFT JOIN table7 t7
        ON t7.[transactionid] = t5.[transactionid]
    LEFT JOIN table8 t8
        ON t8.[voucherid] = t7.[voucherid]
    LEFT JOIN table9 t9
        ON t8.[voucherid] = t9.[voucherid]
    LEFT JOIN table10 t10
        ON t10.[vouchergroupid] = t9.[vouchergroupid]
        AND t10.[territoryid] = t2.[territoryid]
    LEFT JOIN table11 t11
        ON t11.[voucherid] = t8.[voucherid]
    LEFT JOIN table12 t12
        ON t12.[orderid] = t1.[orderid]
GROUP BY 
    t5.[transactionid]

Takes about 2.5 seconds to finish. When I save it to a view and run it as:

SELECT * FROM viewName;

It takes 7 seconds to finish.

What is the reason and how can I make the view faster?

  • 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-05-27T00:53:01+00:00Added an answer on May 27, 2026 at 12:53 am

    There are performance problems with the way views are handled in MySql. Check out this answer here.

    Basically there are 2 different algorithms that are used for views in MySql: Merge and Temptable. Merge usually performs quite well but Temptable can perform quite poorly. Merge cannot be used when the view contains certain constructs including GROUP BY, so your view would be using the Temptable algorithm.

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

Sidebar

Related Questions

Query - Select * FROM tbl1 LEFT OUTER JOIN tbl2 ON tbl1.id = tbl2.id
If I try to run this query in SQL Server 2005: SELECT 1 WHERE
This query works great: var pageObject = (from op in db.ObjectPermissions join pg in
This is my query: SELECT UID, COUNT( * ) *100 AS Points FROM `Visited`
I am getting an error when I run this query because the data type
This SQL query was generated by Microsoft Access 2003, and works fine when run,
My scenario is this: I have a base NHibernate query to run of the
I'm currently trying to run a LINQ query over a MS SQL database. This
I have the following query, now the strange thing is if I run this
I'm working with a MySQL query that writes into an outfile. I run this

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.