Tristramg / mumoro

Multiobjective multimodal shortest path routing
GNU General Public License v3.0
39 stars 6 forks source link

Merging SQL requests #21

Closed ogabrielides closed 14 years ago

ogabrielides commented 14 years ago

Actually, during bike stations states retrieval, the SQL request makes 3 jointures : -From the view recent_bikes which contains idStation and most recent chrone (timestamp) -From the bike_stats table which contains avBikes and avSlots -From the bike_stations_info table which contains the name and the coordinates of each station.

Indexs has been added to both tables , the idea now is to replace the current view with one containing also avBikes and avSlots having for results for the final SQL querry only 2 joinutres instead of 3.

I wasn't capable to include avBikes and avSlots into the view. Potgresql asked me ton include both avBikes and avSlots into the "group by" section.

ogabrielides commented 14 years ago

Corrected, removed view and placed a new table which include all necessery data, emptied and refilled every 5 minutes