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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:04:41+00:00 2026-06-07T12:04:41+00:00

I have searched the web in attempt to work this problem out but to

  • 0

I have searched the web in attempt to work this problem out but to no luck. This is also my first SQL question on SO 🙂

I am but a simple man with simple queries – allow me to demonstrate

select asy.aim_student_id, ast.aim_test  
from aim_student_test ast
  join aim_student_absent asa on (asa.aps_yr = ast.aps_yr and asa.aim_test = ast.aim_test and asa.aim_id = ast.aim_id)
  --join aim_student_qst asq on (asq.aps_yr = ast.aps_yr and asq.aim_test = ast.aim_test and asq.aim_id = ast.aim_id)
  join aim_student_yr asy on (asy.aps_yr = ast.aps_yr and asy.aim_student_yr_id = ast.aim_student_yr_id)
    where ast.aps_yr = '2012'

As you can see – join aim_student_qst is commented out.

aim_student_qst is a table that lists responses by a student to all questions. So one student would have ~50 cases in this table. To test what was slowing my query I simply commented out the joining of aim_student_qst and sure enough my query sped right up.

I assume that what Oracle is doing is going – oh you want those tables, let’s put them into one big table and THEN look for what exactly we want. Which is why my query is slower despite not doing anything else with aim_student_qst. Is this correct?

For my purposes I only need to select one question for each student, rather than all 50, for example. Is there a way to do this?

Thankyou!!!!!

  • 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-07T12:04:43+00:00Added an answer on June 7, 2026 at 12:04 pm

    Maybe this then?

    select asy.aim_student_id, ast.aim_test  
    from aim_student_test ast
      join aim_student_absent asa on (asa.aps_yr = ast.aps_yr and asa.aim_test = ast.aim_test and asa.aim_id = ast.aim_id)
      join aim_student_qst asq on (asq.aps_yr = ast.aps_yr and asq.aim_test = ast.aim_test and asq.aim_id = ast.aim_id)
      join aim_student_yr asy on (asy.aps_yr = ast.aps_yr and asy.aim_student_yr_id = ast.aim_student_yr_id)
    where ast.aps_yr = '2012'
      and asq.question_number = 1 -- column name assumed
      and asq.question_answer is NULL -- column name and value assumed
    ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched the Web for this, but with no luck. Any idea? Thanks.
I have searched the web but I cannot find the solution to my problem.
I have searched all over the web with no luck of making this project
I have searched the web for resolution of this error, but everything I have
I have searched this web looking for an answer, but it seems that this
I have searched the web for this but so far got nowhere. I have
I have searched the web for a way to do this, but perhaps I'm
I want to install rsync on windows xp. I have searched the web, but
Windows Forms, VB. I have searched the web for the correct answer to this
i have searched the web relentlessly for this and have not found anything -

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.