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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:02:59+00:00 2026-06-09T09:02:59+00:00

Assume I have two tables, Student Test Id Name TestId Score StudentId — —-

  • 0

Assume I have two tables,

   Student                           Test

Id    Name                   TestId   Score  StudentId
--    ----                   ------   ----  ---------  
1    Mark                      774     100       1   
2     Sam                      774      89       2  
3    John                      775      78       3

Now I have to print student name,test id and score of each student.

I know both of them produce the same results.But which one is better in terms of performance?Does the second one find cartesian product and then apply filter(where clause)?

1.Select test.testid,student.name,test.score 
  from student 
  join test 
  on test.studentid=student.id

2.Select test.testid,student.name,test.score  
  from student,test 
  where test.studentid=student.id
  • 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-09T09:03:02+00:00Added an answer on June 9, 2026 at 9:03 am

    I’m not going to answer your question directly but rather provide you with a tool to solve such problems in the future.

    Oracle offers ways to see how queries are executed. You can see how the access to your tables is performed, how much time a query execution takes, whether indexes are used or not, etc.

    The commands are:

    EXPLAIN PLAN
    and
    SET AUTOTRACE.

    In your case, it would be as simple as this:

    EXPLAIN PLAN FOR
    Select test.testid,student.name,test.score 
    from student 
    join test 
    on test.studentid=student.id;
    
    EXPLAIN PLAN FOR
    Select test.testid,student.name,test.score  
    from student,test 
    where test.studentid=student.id;
    

    Or using autotrace:

    Set autotrace on;
    
    Select test.testid,student.name,test.score 
    from student 
    join test 
    on test.studentid=student.id;
    
    Select test.testid,student.name,test.score  
    from student,test 
    where test.studentid=student.id;
    

    In case of EXPLAIN PLAN, the results are kept in a special table that you can query to see them. Check the documentation I linked to in order to see what can be done with it.

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

Sidebar

Related Questions

Assume I have two tables, Student Test Id Name TestId Type StudentId -- ----
To illustrate, assume that I have two tables as follows: VehicleID Name 1 Chuck
Assume I have two tables: Table MY_ENTITY ID: PK OTHER_ID: FK to table OTHER
Let's assume I have a database with two tables: categories and articles . Every
Assume I have a two tables, A and B. Table A has a primary
Assume that I have two parent tables: Company and Contact . Assume that both
Assume, we have two tables: "Items" and "Types". The relationships are: item belongs_to type
Assume that we have two tables: Roles and Reports . And there exists a
I have two tables say ( FCT_SALES_SUMMARY_A and FCT_SALES_SUMMARY_B ). If we assume that
I have two tables, users{name,id,age_range_id} and age_ranges{id,range_name} . There are also two models, controllers

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.