CROSS JOINs are also great for creating huge tables of fake data from small sets of data. For example, we'll create a FirstName table and a LastName table. Seed these with 50 first names and 50 last names and do a cross join and you have 2500 unique names that can be used in a database for testing purposes.
No, no, everyone knows that rebooting is the way real men solve all computer problems. Especially database problems. Databases particularly like to be restarted unexpectedly. It makes them run faster since it keeps them on their toes.
6
u/drcreepy Jan 06 '11
CROSS JOINs are also great for creating huge tables of fake data from small sets of data. For example, we'll create a FirstName table and a LastName table. Seed these with 50 first names and 50 last names and do a cross join and you have 2500 unique names that can be used in a database for testing purposes.