Re: Cartesian Product

From: Nicholas Carey <ncarey_at_speakeasy.org>
Date: Tue, 20 Nov 2001 00:17:10 -0000
Message-ID: <Xns915EA5AC13611ncareyspeakeasyorg_at_207.126.101.92>


On 19 Nov 2001, "Lonnie" <lonnie2000_at_atl.mediaone.net> spake and said:

> 1. What would happen if the two tables that we were
> joining had 300,000 records in each table. What would
> be the total number of rows returned?
>
> 2. What would a Cartesian Product statement do to the
> database if the two tables had 300,000 rows in each
> table?

Err...it would [try] to return some 90,000,000,000 (90 BILLION) rows. If your query returned, say, 2000 rows per second, and began returning rows immediately, it would take approximately 521 days for your query to run to completion:

  520.83 = 90,000,000,000 / ( 24 * 60 * 60 * 2000 )

That works out to be about 1 year and 5 months, give or take a little.

You don't have the patience.

-- 
Received on Tue Nov 20 2001 - 01:17:10 CET

Original text of this message