A volley from Gavi was the pick of Spain's six goals. That came prior to Carlos Soler's 90th minute effort, which seemed to be the final action of the night.
Here are the player ratings from Al-Thumama Stadium:
Unai Simon - 6.5/10
This might have been the quietest night of Simon's professional career - he did not have a single save to make. Was fairly good with the ball at his feet, completing 90% of his 31 passes.
Cesar Azpilicueta - 7.5/10
As with most of this Spain team, saw plenty of the ball and was never tested defensively. An active performance down the right side.
Rodri - 8/10
Very composed with the ball, completed 137 of his 140 passes. Had no defensive actions to make, other than a single clearance.
Aymeric Laporte - 8/10
Managed to marginally statistically surpass Rodri. Completed six more passes and had a couple of tackles he was forced to complete. A very comfortable evening.
Jordi Alba (64') - 9/10
An accurate low cross from the left side led to Asensio's goal, following his first-time finish. Also won the penalty after a lazy challenge from Duarte on him. Taken off just after the hour mark and preserved for the rest of the group stage and, more likely than not, knockout rounds.
Sergio Busquets (64') - 7.5/10
Was substituted along with Alba after an impressive performance. An effective physical presence - won seven out of his nine aerial and ground duels, in addition to being reliable in possession, as he usually is.
Gavi - 8.5/10
A brilliant volley from the edge of the box, which came off of the outside of his right foot, was a fantastic way to round off a good performance. Saw comparatively less of the ball than his midfield counterparts, so that volley was a welcome reward for the Barcelona wonderkid.
Pedri (57') - 8/10
From one young Barcelona star to another. It was a hugely impressive 57-minute cameo from Pedri. On average, he completed a pass and a half per minute - demonstrating how instrumental he was to Spain's play and how much of an important role he should play in this tournament.
Marco Asensio (69') - 8.5/10
Had a few efforts on goal, throughout the evening. Produced a neat first-time finish from Alba's cross to get his name on the scoresheet. Linked up nicely with his team-mates. A good game.
Dani Olmo - 9/10
Played a large part in the first and last goals of the night. Did brilliantly to control a deflected pass from Gavi and loft the ball over the keeper with his second touch, to open the floodgates. Rounded off a great performance with a late assist for Morata.
Ferran Torres (57') - 9/10
Would likely have had a hat-trick, if he was kept on for the whole 90 minutes. A successful spot-kick and a scruffy goal early in the second half were enough for Enrique to decide to preserve his energies for the rest of Spain's campaign.
Alvaro Morata (57') - 9/10
Picked out Gavi with a brilliant cross from the left wing and earned an assist. Managed to grab a late goal for himself, after a great bit of link-up with Olmo.
Carlos Soler (57') - 8.5/10
Along with Morata, earned himself a goal, late on. Misplaced just one out of his 42 attempted passes, following his introduction.
Alejandro Balde (64') - N/A
Koke (64') - N/A
Nico Williams (69') - N/A
Keylor Navas - 3/10
Only made one save. Could have done better for a few of the seven goals. Asensio's and Torres' second goal, in particular. A difficult evening for the keeper, along with all of his team-mates.
Carlos Martinez (45') - 3/10
Was fortunate to be brought off at half-time and not have to endure any further suffering. Had a dreadful time dealing with Alba - who got an assist and won a penalty on his side, within the first 45 minutes.
Oscar Duarte - 3/10
Gave away a penalty, following a very poor and lazy challenge on Alba. Struggled, like everyone else, to deal with Spain's significantly higher quality.
Francisco Calvo - 4/10
Was a difficult evening for the centre-back. Unlike his partner, he, at least, did not give a very poor penalty away. Won six of his 11 aerial and ground duels - which is something which he may come away with some credit with.
Bryan Oviedo (82') - 4/10
Saw very little of the ball and could not do much to help his team defensively. Pinned deep down the left side and had no opportunities to get forward down the wing.
Celso Borges (72') - 6/10
A relatively impressive performance. Was effective with the ball and a positive aerial presence - won all four of his aerial duels. Should be one of the few, if not the only one, to come away with some credit from this fixture.
Yeltsin Tejeda - 4/10
Chasing shadows for most of the game. Saw very little of the ball, contributed minimally defensively.
Keysher Fuller - 3/10
Along with Martinez, failed to deal with the threat of Alba in the first half. Nothing positive to note.
Jewison Bennette (61') - 3/10
Did not misplace a pass in his hour-long appearance. Making that less impressive is the fact that he only managed to complete two of them. Taken off after 61 minutes, following a passive performance.
Joel Campbell - 5.5/10
Saw a decent amount of the ball, considering how little of it his team had. Retained possession well at times and looked fairly combative off the ball.
Anthony Contreras - 3/10
Dropped fairly deep, into the midfield area, due to how little of the ball he was able to have. The recognised forward was one of the main men to suffer from this backs to the wall Costa Rica effort.
Kendall Watson (45') - 5/10
Had a better half than Martinez did. Managed a few clearances and interceptions, but that is minuscule consolation, in a half during which his team conceded four goals.
Bryan Ruiz (61') - N/A
Alvaro Zamora (61') - N/A
Brandon Aguilera (72') - N/A
Ronald Matarrita (82') - N/A