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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:51:40+00:00 2026-05-23T13:51:40+00:00

My data scheme is really simple, let s say it’s about farms tableA is

  • 0

My data scheme is really simple, let s say it’s about farms

  • tableA is the main one, with an
    important field “is_active” assuming
    the farm is trusted (kind of)
  • tableB is a data storage of
    serialized arrays about farms
    statistics

I want to retrieve all data about active farm so I just do something like that:

SELECT * FROM tableA LEFT JOIN tableB ON id_tableA=id_tableB WHERE is_active=1 ORDER BY id_tableA DESC;

Right now the query takes 15 sec to execute straight from a sql shell, for example it I want to retrieve all data from the tableB, like :

 SELECT * FROM tableB ORDER BY id_tableB DESC;

it takes less than 1 sec (approx 1200 rows)…

Any ideas how to improve the original query ?

thx

  • 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-23T13:51:40+00:00Added an answer on May 23, 2026 at 1:51 pm

    Create indexes on the keys joing two tables..

    check this link, how to create indexes in mysql:
    http://dev.mysql.com/doc/refman/5.0/en/create-index.html

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

Sidebar

Related Questions

I want an adaptable database scheme. But still use a simple table data gateway
I have 3 Oracle database instances with the same data and scheme that I
Is there any best practice data model for authentication/authorization scheme?
I want to use Custom URL Scheme to transfer data from application to other
I'm looking for an example of how to split-out comma-delimited data in a field
I am creating an application where there is main DB and where other data
I am currently updating a webpage that has some very simple data displayed in
We're thinking about putting up a data warehouse system to load with web access
I HAVE to be missing something really simple here! I have a database in
I have set up a simple core data schema, where item objects are added

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.