Changes between Version 8 and Version 9 of Optimization


Ignore:
Timestamp:
06/14/26 21:15:46 (7 days ago)
Author:
231184
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Optimization

    v8 v9  
    2222
    2323{{{
    24 -- 1. Бришење на индексот ако веќе постои
    25 DROP INDEX IF EXISTS idx_appointment_customer_not_cancelled;
    26 
    27 -- 2. Освежување на статистиките
    28 ANALYZE appointment;
    29 
    30 -- 3. Мерење без индекс
     24
     25-- 1. Мерење без индекс
    3126EXPLAIN ANALYZE
    3227SELECT *
     
    3429WHERE customer_id = 100;
    3530
    36 -- 4. Креирање на индекс
     31-- 2. Креирање на индекс
    3732CREATE INDEX IF NOT EXISTS idx_appointment_customer_not_cancelled
    3833ON appointment(customer_id)
    3934WHERE status <> 'cancelled';
    40 
    41 -- 5. Освежување на статистиките
    42 ANALYZE appointment;
    43 
    44 -- 6. Мерење со индекс
    45 EXPLAIN ANALYZE
    46 SELECT *
    47 FROM customer_appointments_view
    48 WHERE customer_id = 100;
    4935}}}
    5036