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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:46:06+00:00 2026-06-02T13:46:06+00:00

I’ve created a table: CREATE TABLE IF NOT EXISTS `markersStorage2` ( `id` int(11) NOT

  • 0

I’ve created a table:

    CREATE TABLE IF NOT EXISTS `markersStorage2` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
      `surname` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
      `id_vk` int(10) NOT NULL,
      `activity_link` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
      `message` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
      `lat` float(10,6) NOT NULL,
      `lng` float(10,6) NOT NULL,
      `type` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
      `id_tile` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci 

I’m using it to store google maps markers by tiles.

This table is frequently updated, i mean that new markers are added into it

I’m using this query a lot:

    SELECT id, lat,lng FROM markersStorage2 WHERE id_tile LIKE '$tileNumber%'

How can i speed up this query? Maybe i need to create another table or reorganise this one?

Tiles are numbered like here:

http://msdn.microsoft.com/en-us/library/bb259689.aspx

Example: I’m using the max zoom 15, so therefore when i add a new marker to DB the server

determine in which tile this marker will be located for example we will get smth like this

    id_tile = 002013111032032

All markers have id_tile with 15 numbers no less no more.

Later when user look through the map tiles are being requested via ajax, but this tiles can

be on different zoom levels and for example we will get this request:

       SELECT id, lat,lng FROM markersStorage2 WHERE id_tile LIKE '002013111032%'

So using this request i can get all the markers in this big tile.

  • 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-02T13:46:07+00:00Added an answer on June 2, 2026 at 1:46 pm

    you need to put an index on id_tile field.

    ALTER TABLE `markersstorage2`  ADD INDEX `id_tile` (`id_tile`);
    

    You can check if your query uses an index or not like this:

    explain SELECT id, lat,lng FROM markersStorage2 WHERE id_tile LIKE
    ‘3%’

    without index

    “id”;”select_type”;”table”;”type”;”possible_keys”;”key”;”key_len”;”ref”;”rows”;”Extra”
    “1”;”SIMPLE”;”markersStorage2″;”ALL”;NULL;NULL;NULL;NULL;”7″;”Using
    where”

    with index

    “id”;”select_type”;”table”;”type”;”possible_keys”;”key”;”key_len”;”ref”;”rows”;”Extra”
    “1”;”SIMPLE”;”markersStorage2″;”range”;”id_tile”;”id_tile”;”47″;NULL;”3″;”Using
    where”

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I am trying to understand how to use SyndicationItem to display feed which is
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.