Changes between Version 2 and Version 3 of OtherTopics


Ignore:
Timestamp:
06/01/26 22:51:45 (2 weeks ago)
Author:
181201
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OtherTopics

    v2 v3  
    8080}}}
    8181
     82(Note, for the exact same performance reasons, we also created to optimize the queries when Pet Owners view their own bookings)
     83{{{
     84#!sql
     85CREATE INDEX idx_bookings_owner_date
     86ON project.bookings (owner_id, date_from DESC);
     87}}}
     88
    8289Execution with indexes:
    8390
     
    100107
    101108Because the execution time has been massively lowered by bypassing the expensive sequential scan and memory sort, we '''keep''' this index.
     109
     110*(Note: For the exact same performance reasons, we also created `CREATE INDEX idx_bookings_owner_date ON project.bookings (owner_id, date_from DESC);` to optimize the queries when Pet Owners view their own booking history).*
     111
    102112
    103113== 2. Calculate average sitter rating ==