Changes between Version 22 and Version 23 of QueryOptimization


Ignore:
Timestamp:
04/26/26 16:17:33 (6 days ago)
Author:
231027
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QueryOptimization

    v22 v23  
    290290
    291291[attachment:Event_Financial_Summary_No_Index.csv]
     292
     293==== Со индекс:
     294
     295{{{
     296
     297-- index for linking ticket purchases to the specific tickets
     298CREATE INDEX idx_ticket_purchase_ticket_id ON "Ticket_Purchase"(ticket_id);
     299
     300-- index for the LEFT JOIN with refunds to calculate net revenue accurately
     301CREATE INDEX idx_ticket_refund_purchase_id ON "Ticket_Refund"(purchase_id);
     302
     303-- index for linking tickets to scheduled events
     304CREATE INDEX idx_ticket_event_happening_id ON "Ticket"(event_happening_id);
     305
     306
     307EXPLAIN ANALYZE
     308    SELECT *
     309    FROM "Event_Financial_Summary";
     310
     311}}}