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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:57:38+00:00 2026-06-10T20:57:38+00:00

I have this simple query that runs in 0.55s. SELECT tr.* FROM Tournament_Result tr,

  • 0

I have this simple query that runs in 0.55s.

SELECT tr.*

FROM Tournament_Result tr, Game g, Tournament t
LEFT JOIN Tournament_Type tt ON t.intType = tt.intTournamentType

WHERE tr.intTournamentId = t.intTournamentId
AND t.intGameId = g.intGameId
AND t.strStatus = 'live'

ORDER BY dtmCreated DESC

All joins are keys, either primary or index keys. If I removed the left join “LEFT JOIN Tournament_Type tt ON t.intType = tt.intTournamentType”, the query runs instantly.

So I figure it must be the “t.intType = tt.intTournamentType” join, but I checked and both keys are indecies. Not sure what to do here. I even tried direct join and its always the Tournament_Type table that slows it down. I even ran the “OPTIMIZE” command on it.

Any ideas?

Thanks in advance!

Armin

  • 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-10T20:57:39+00:00Added an answer on June 10, 2026 at 8:57 pm

    There is something missing in the query.Tournament_Type table is LEFT JOINED and

    also none of the fields from Tournament_Type table used in any other join or in the SELECT

    If you are adding one column from Tournament_Type table to be shown in the result

    SELECT Tournament_Result.*,
    (select <<Col1>> from Tournament_Type where Tournament_Type.intTournamentType=t.intType)
    
    FROM  Game 
    inner join Tournament on Tournament.intGameId = Game.intGameId
    inner join Tournament_Result on Tournament_Result.intTournamentId = Tournament.intTournamentId
    WHERE Tournament.strStatus = 'live'
    ORDER BY dtmCreated DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this simple query : SELECT YEAR(P.DateCreated) ,MONTH(P.DateCreated) ,COUNT(*) AS cnt FROM tbl1,
I have this simple query: SELECT xObjectID, xObjectName FROM dbo.xObject where CONTAINS( xObjectRef, '1838
I have this query: SELECT * FROM sample INNER JOIN test ON sample.sample_number =
I have a very simply query like this: SELECT users.id, COUNT(others.id) as c FROM
I have a fairly simple query that runs super fast most of the time
I have a very simple query that is not much more complicated than: select
I have a simple query that runs in SQL 2008 and uses a custom
I will make this quick and simple I have a query and I want
This is a simpler version of the query I have. Alias1 as (select distinct
I have a simple query that relies on two full-text indexed tables, but it

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.