in Education by
I have 3 table a,b,c. select * from a select * from b where aid in (select id from a) select * from c where bid in (select Id from b where aid in (select id from a)) These queries in sp and working fine but as performance I need to optimise these. Could you please suggest how do I improve perfomance, or any tools available to optimise sql queries. Thanks . JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I think you could rewrite the queries using INNER JOIN: select * from c INNER JOIN b ON b.id = c.bid INNER JOIN a ON a.id = b.aid if you have indexes on id, bid and aid all should be fine

Related questions

0 votes
    I have 3 table a,b,c. select * from a select * from b where aid in (select id from a) ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    Which of the following can improve the performance of an AI agent? a) Perceiving b) Learning c) Observing d) All of the mentioned...
asked Jan 15, 2023 in Education by JackTerrance
0 votes
    Here is the example of my data set from some public transports: data set. Date is from 2018-06-01 ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    Here is the example of my data set from some public transports: data set. Date is from 2018-06-01 ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    R comes with a ________ to help you optimize your code and improve its performance. (a) debugger (b) ... Analysis of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    I have noticed that when One Hot encoding is used on a particular data set (a matrix) and used as training data ... how does it happen? Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    Machine Learning refers to. a) Computer systems ability to improve its performance Select the correct answer from above options...
asked Nov 12, 2021 in Education by JackTerrance
0 votes
    __________ is increasingly being used in server systems to improve performance by caching frequently used data, ... in portion Storage and File Structures of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    How can we improve the Performance of an ASP.NET Web Page?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    How to Improve Security Performance?...
asked Oct 24, 2020 in Technology by JackTerrance
0 votes
    Indexes are for improving the performance of queries, and, for some MarkLogic features, are required. (1)True (2)False...
asked Sep 23, 2021 in Technology by JackTerrance
0 votes
    Indexes are for improving the performance of queries, and, for some MarkLogic features, are required. (1)True (2)False...
asked Sep 23, 2021 in Technology by JackTerrance
0 votes
    ______ let's you perform SQL queries on your R data frames. (a) sqldf (b) plyr (c) forecast (d) ... Linear Regression of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    The SQL queries/API calls are converted to ------------------------- 1. Language-neutral ... 2. Platform-neutral expressions 3. Logical-neutral expressions 4. Logical expressions...
asked Oct 22, 2020 in Technology by JackTerrance
0 votes
    Which of these code snippet is the correct format to run SQL queries? 1. display(spark.sqlContext("select * from Fresco")) 2 ... ")) 4. show(spark.sql("select * from Fresco"))...
asked Oct 22, 2020 in Technology by JackTerrance
...