use tempdb; create table A ( id int identity constraint PK_A primary key, value uniqueidentifier default newid() ); create table B ( id int identity constraint PK_B primary key, value uniqueidentifier default newid() ); create table C ( id int identity constraint PK_C primary key, value uniqueidentifier default newid() ); create table D ( id int identity constraint PK_D primary key, value uniqueidentifier default newid() ); create table E ( id int identity constraint PK_E primary key, value uniqueidentifier default newid() ); create table F ( id int identity constraint PK_F primary key, value uniqueidentifier default newid() ); create table G ( id int identity constraint PK_G primary key, value uniqueidentifier default newid() ); GO set nocount on; insert A default values; GO 100 insert B default values GO 500 insert C default values GO 1000 insert D default values; GO 10000 insert E default values; GO 100000 insert F default values; GO 1000000 select a.value, b.value, c.value from a inner join b on a.id = b.id inner join c on b.id = c.id inner join d on c.id = d.id inner join e on d.id = e.id inner join f on e.id = f.id where CAST(f.value AS VARCHAR(100)) LIKE 'A%' select a.value, b.value, c.value from f inner join e on e.id = f.id inner join d on d.id = e.id inner join c on c.id = d.id inner join b on b.id = c.id inner join a on a.id = b.id where CAST(f.value AS VARCHAR(100)) LIKE 'A%'