Select query to return locations of map when users click

I work on the map and keep the locations in the database.
There are different locations of the map on the table. There are many locations within the table. Now different users come and click on different position on the map, so I have to select a query in the database to find each location. Is this correct? That means I run a query for every click.
In my opinion, specify a dimension(area), and whenever these dimensions are loaded, I select all the locations within those dimensions to avoid additional query select to database.

What is the best optimization way?

You ever heard of POITROAE?

No, i don’t hear.

Not a very helpful answer @Thallius. Perhaps you could explain further?

Why isn’t this helpful? It is the answer to his question.

Do not optimize a code if it is not needed. First try the easiest and cleanest solution and only start to optimize if it is to slow.

The answer was very bad and did not help me.
You’d better write about spatial index data or polygon and…

Mostly because it (and your further explanation) are just very general comments and you don’t relate them to the OP’s actual question.