Changes between Version 8 and Version 9 of Optimization
- Timestamp:
- 06/14/26 21:15:46 (7 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Optimization
v8 v9 22 22 23 23 {{{ 24 -- 1. Бришење на индексот ако веќе постои 25 DROP INDEX IF EXISTS idx_appointment_customer_not_cancelled; 26 27 -- 2. Освежување на статистиките 28 ANALYZE appointment; 29 30 -- 3. Мерење без индекс 24 25 -- 1. Мерење без индекс 31 26 EXPLAIN ANALYZE 32 27 SELECT * … … 34 29 WHERE customer_id = 100; 35 30 36 -- 4. Креирање на индекс31 -- 2. Креирање на индекс 37 32 CREATE INDEX IF NOT EXISTS idx_appointment_customer_not_cancelled 38 33 ON appointment(customer_id) 39 34 WHERE status <> 'cancelled'; 40 41 -- 5. Освежување на статистиките42 ANALYZE appointment;43 44 -- 6. Мерење со индекс45 EXPLAIN ANALYZE46 SELECT *47 FROM customer_appointments_view48 WHERE customer_id = 100;49 35 }}} 50 36
