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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:16:27+00:00 2026-05-13T20:16:27+00:00

In my application, my module uses the following tables PUBLIC_APPLICATION CATEGORY_MASTER NOTIFICATION_SITE_DETAIL DIMENSION_MASTER DM

  • 0

In my application, my module uses the following tables

  1. PUBLIC_APPLICATION
  2. CATEGORY_MASTER
  3. NOTIFICATION_SITE_DETAIL
  4. DIMENSION_MASTER DM
  5. PUBLIC_REGISTRATION
  6. ALLOTMENT_NOTIFICATION.

From the following tables I am retrieving the data

SELECT PA.REGISTRATION_NO,PA.APP_ID,PA.NO_OF_ATTEMPTS,CM.CATEGORY_NAME,
DM.SITE_DIMENSION,PR.BDA_NO,AN.NOTIFY_ID 
 FROM **PUBLIC_APPLICATION PA,CATEGORY_MASTER CM,NOTIFICATION_SITE_DETAIL NSD,DIMENSION_MASTER DM, PUBLIC_REGISTRATION PR,ALLOTMENT_NOTIFICATION AN** 
WHERE **CM.CATEGORY_ID = PA.CATEGORY_ID AND 
NSD.NOTIFY_SITE_ID = PR.NOTIFY_SITE_ID AND 
DM.DIMENSION_ID = NSD.DIMENSION_ID AND 
PR.REGISTRATION_NO = PA.REGISTRATION_NO AND 
AN.NOTIFICATION_NO = PA.NOTIFICATION_NO AND
PR.NOTIFY_SITE_ID = PA.NOTIFY_SITE_ID AND NSD.NOTIFY_ID = AN.NOTIFY_ID AND 
PA.NOTIFICATION_NO = ?**  LIMIT ?, ?

PUBLIC_APPLICATION & PUBLIC_REGISTRATION have large number of data, nearly i Million records and other tables have around 5000 records.

If I execute the above the query it takes more than 30 min to get the results, Can any one suggest me to write the effiecient query to get the results within minimum time.

forgot to specify, I am using the mysql database for this.

  • 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-13T20:16:27+00:00Added an answer on May 13, 2026 at 8:16 pm

    By using “STRAIGHT_JOIN”, you tell the optimizer to do it as you say so.
    I moved the Notification # as the first WHERE clause so it gets handled first to limit your set. THEN, I set the joins to the other tables. I had this before when querying gov’t data of 15+ million records to join 15+ tables and it took 20+ hours. By adding just the “STRAIGHT_JOIN” to my already well-formed query, it took about 2 hours … again, 15+ million records and join to over 15 tables for child descriptive details.

    SELECT STRAIGHT_JOIN
            PA.REGISTRATION_NO,
            PA.APP_ID,
            PA.NO_OF_ATTEMPTS,
            CM.CATEGORY_NAME, 
            DM.SITE_DIMENSION,
            PR.BDA_NO,
            AN.NOTIFY_ID 
        FROM 
            PUBLIC_APPLICATION PA,
            CATEGORY_MASTER CM,
            NOTIFICATION_SITE_DETAIL NSD,
            DIMENSION_MASTER DM, 
            PUBLIC_REGISTRATION PR,
            ALLOTMENT_NOTIFICATION AN 
        WHERE 
                PA.NOTIFICATION_NO = ? 
            AND PA.CATEGORY_ID = CM.CATEGORY_ID
            AND PA.REGISTRATION_NO = PR.REGISTRATION_NO
            AND PA.NOTIFICATION_NO = AN.NOTIFICATION_NO
            AND PA.NOTIFY_SITE_ID = PR.NOTIFY_SITE_ID 
            AND PR.NOTIFY_SITE_ID = NSD.NOTIFY_SITE_ID
            AND NSD.DIMENSION_ID  = DM.DIMENSION_ID
            AND NSD.NOTIFY_ID = AN.NOTIFY_ID 
        LIMIT 
            ?, ?
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got (working) application done with ttk. It uses self-created module for showing a
I have the following code in my Mojolicious application module. When I run this
I am currently switching from ant to gradle for my multi module web application
I have a multi module maven web application, which uses hibernate. I use the
In my gwt application somebody developed a module which uses java.beans.PropertyChangeSupport. Recently I have
I am writing a module for a third party application; the application uses __cdecl
My web application uses enterprise library caching module. I've a config value below for
When I run an application that uses db40 I get the following error. Any
I'm writing an application configuration module that uses XML in its files. Consider the
Currently, I have an application which uses the cmd.Cmd module for the command line

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.