
Hi Chris, SQL like this: select count(*) from table1 where key27 in (select key27 from table2) or key27 in (select key27 from table3); Does NOT crash the server. What I'm looking for is a good example how to match tables in MonetDB, I mean the software is amazing. Thanks. Dariusz. Chris Curvey wrote:
On Thu, Jan 15, 2009 at 9:13 AM, dariuszs
mailto:dariuszs@svnp.com> wrote: Hi, table1 - 1,000,000 records table2 - 300,000 records (from table1) table3 - 400,000 records (from table1)
They key (key27) on all tables is varchar(27) SQL
select count(*) from table1 where key27 in (select key27 from table2, table3); (the answer should be 700,000)
At this point server crashed.
I'm trying to join 3 tables to get a count on table1 only when there is a match in table2 or table3. Could you provide me with a sample how to properly match 3 or more tables based on the match key? Thank you. Dariusz.
Just curious, does it work if you don't have a cartesian product in the subquery? (there is no condition to match table2 rows with table3 rows) ------------------------------------------------------------------------
------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ------------------------------------------------------------------------
_______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users