Changes between Version 10 and Version 11 of OtherTopics
- Timestamp:
- 02/13/26 21:11:54 (2 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OtherTopics
v10 v11 274 274 275 275 {{{ 276 select*277 fromsongs s278 left join albums a ona.id = s.album_id279 wheres.album_id = :albumId;276 SELECT * 277 FROM songs s 278 LEFT JOIN albums a ON a.id = s.album_id 279 WHERE s.album_id = :albumId; 280 280 }}} 281 281 … … 289 289 290 290 Без индекс добиваме: 291 {{{ 291 292 +-------------------------------------------------------------------------------------------------------------------------------------+ 292 293 |QUERY PLAN | … … 306 307 |Execution Time: 57.726 ms | 307 308 +-------------------------------------------------------------------------------------------------------------------------------------+ 309 }}} 308 310 309 311 Просечно `Execution time` е **56,24ms**. 310 312 311 313 По додавање на индекс: 314 {{{ 312 315 +-------------------------------------------------------------------------------------------------------------------------------------+ 313 316 |QUERY PLAN | … … 326 329 |Execution Time: 0.090 ms | 327 330 +-------------------------------------------------------------------------------------------------------------------------------------+ 331 }}} 328 332 329 333 Просечно `Execution time` е сега **0.092ms**. Можеме да забележиме користење на индекс преку `Bitmap Index Scan on idx_songs_album`.
