project-music-metadata / RESULTS.md
RESULTS.md
Raw

Lab 1 results

Your name: Robin Wang

Part 1

Paste the results of your queries for each question given in the README below:

  1. 22344 Outburst, 66084 Got My Modem Working, 66096 Mistress Song.

  2. Radio-Safe, Radio-Unsafe, Adults-Only.

  3. 62460 Siesta.

  4. 453

  5. de, ru.

  6. 216 tracks if we consider the artists with active year begin >= 1990 and active year end <= 1999.

  7. U Can Unlearn Guitar, Ars Sonor, Disco Missile.

  8. 76008 JessicaBD Cody Goss

Part 2

  • Execution time before optimization: Mean time: 0.053 [seconds/query]; Best time: 0.010 [seconds/query]

  • Execution time after optimization: Mean time: 0.041 [seconds/query]; Best time: 0.008 [seconds/query]

  • Briefly describe how you optimized for this query: I created four new indices on the track, album, and artist tables. Doing so allows me to speed up the query by quickly finding the rows that match a specific citeria. The joins among the track, album and artist tables are speed up by the indices.

  • Did you try anything other approaches? How did they compare to your final answer? Initially, I tried to create an index named 'idx_album_id' that maps the values in the 'id' column to the corresponding rows in the 'album' table. This approach is not as effecient as the speed increase is only about 2 seconds decrease in the mean time. Later, I found that creating an index that maps the values in the 'id' column to the corresponding rows in the 'artist' table is more efficient. The speed increase is about 12 seconds decrease in the mean time.