SQL server – Updating values ​​in the table according to the ranges defined in another table

I have two tables the definitions and l & # 39; history with the following diagram:

create table definitions (
UNIQUE IDENTIFIER,
INT revision,
majorVersion INT
)
create a table history (
UNIQUE IDENTIFIER,
INT revision
)

I want to update the table l & # 39; history with another column major version where the value ranges are defined in the table the definitions. For example, if records in the definitions look like:

+ -------------------------------------- + ---------- - + --------------- +
| id | revision | majorVersion |
+ -------------------------------------- + ---------- - + --------------- +
| 9f717823-b9ca-4c7b-97f9-7770aaafb468 | 2 | 1 |
| 9f717823-b9ca-4c7b-97f9-7770aaafb468 | 4 | 2 |
+ -------------------------------------- + ---------- - + --------------- +

Then the table updated l & # 39; history should look like this:

+ -------------------------------------- + ---------- - + --------------- +
| id | revision | majorVersion |
+ -------------------------------------- + ---------- - + --------------- +
| 9f717823-b9ca-4c7b-97f9-7770aaafb468 | 1 | 1 |
| 9f717823-b9ca-4c7b-97f9-7770aaafb468 | 2 | 1 |
| 9f717823-b9ca-4c7b-97f9-7770aaafb468 | 3 | 2 |
| 9f717823-b9ca-4c7b-97f9-7770aaafb468 | 4 | 2 |
+ -------------------------------------- + ---------- - + --------------- +

Here is a SQL Fiddle with a larger number of lines.
Table the definitions can potentially contain thousands of different login and several majorVersion. Then table l & # 39; history can contains can contain nearly a million lines.

I want the request to be as fast and optimized as possible. One possible solution is to use something like this:

update of the history
set majorVersion = (
select top 1 majorVersion
definitions
where definitions.id = history.id
and definitions.revision> = history.revision
order by definitions.majorVersion
)
where history.majorVersion = 0; 

But the problem with this is that we are querying rows for each row of the table l & # 39; history (which can be very big compared to the definitions). Any suggestions on how to improve this?