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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:25:14+00:00 2026-06-10T17:25:14+00:00

I have a database of geolocalized objects: id latitude longitude I am querying the

  • 0

I have a database of geolocalized objects:

  • id
  • latitude
  • longitude

I am querying the database to fetch objects that are inside a box:

WHERE longitude >= - 33.83789
  AND longitude <= 33.837891
  AND latitude >= 4.214943
  AND latitude <= 40.979898

There is one index on: latitude, longitude.

Is there a more efficient way of storing/querying the database? Right now, depending of the box coordinates/objects density, query times vary from 0.1s to more than 1s.

I know about MySQL Spacial extension, but it seems a bit of work to use and I have no idea if it will be easier/more efficient.

Additional info: I am also planning of performing simple distance-based queries (fetch objects near a specified location) in the future.

  • 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-10T17:25:15+00:00Added an answer on June 10, 2026 at 5:25 pm

    Is there a more efficient way of storing/querying the database?

    Absolulely, yes! Spatial extensions are exactly designed to solve this problem.

    I know about MySQL Spacial extension, but it seems a bit of work to use and I have no idea if it will be easier/more efficient.

    It’s not easier (but it’s not much harder), and it is more efficient. For large data sets it can be a lot more efficient.

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

Sidebar

Related Questions

I have database that has multiple schemas and objects under them. I want to
i have DataBase function that calculate distance by coordinates CREATE OR REPLACE FUNCTION distance(lat1
that my problem: I have database table like that: id (AI) market_id 1 6
I Have Database that contains 4 tables TABLE TBLCARTITEM (CART_ID, ITEM_ID, PROMOTION_ID, many more
I have database called wisherDB, and I have a table called tbltasks inside the
I have database table. As I further saw that the data was in a
Okay so I have database and I need to extract only certain rows that
I have database where data is stored along timestamp entries, that are keys. i
I have database of different hotels for different cities. Each hotel has latitude and
I have database cleanup that I need to do within a running service thread.

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.