Quantcast
Channel: Optimizing this MySQL query with a subquery inside - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Rick James for Optimizing this MySQL query with a subquery inside

Your latitude and longitude worse than useless as VARCHAR(255). For homes, this should be good: latitude DECIMAL(6,4), longitude DECIMAL(7,4) What kind of id needs to be VARCHAR(255)? Are you expecting...

View Article


Answer by ArtCHNK for Optimizing this MySQL query with a subquery inside

You might move price condition to the subquery. WHERE r.price >= 10 , if you consider only records with price >= 10 (before calculating average) HAVING avg(r.price) >= 10 , if you consider the...

View Article


Optimizing this MySQL query with a subquery inside

For given longitude, latitude and radius I should select the averagePrice, numberOfListings, ... from a database with 500'000 data records. (id) 1 (select_type) SIMPLE (table) database (partitions)...

View Article
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>