List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:April 26 1999 2:49pm
Subject:Re: Problem executing query, a bug perhaps?
View as plain text  
"A. Brandic" wrote:
> 
> Hi!
> 
> I've got a problem with MySql and I'm not sure if it is a bug or my
> fault.  I'm running MySql 3.22.21
> on Alpha 800 with Unix 4.0 on it and MySql was installed as Binary version.
> 
> I've created three test tables each containing just over 15000 records in
> 14 columns.
> If I do a simple query such as :
> mysql> select Universe.Surname from Universe, TestTable where
>          -> ID=AdmissionNo;
> 
> ID is unique for TestTable and it is integer(9) Primary Key and
> auto_increment  and
> AdmissionNo  is unique for Universe and it is integer(9) Primary Key and
> auto_increment as well.
> 
> This executes in 1.05 secs with no probs.
> 
> But when I do a similar query:
> mysql> select Universe.Surname from Universe, TestTable, Streams where
>          -> ID=AdmissionNo;
> 
> Still ID and AdmissionNo are Unique for their tables and do not appear in
> any other table but this time
> I've inserted Streams table which is not used at all.
> Well this time after 2min the following is displayed
> 
> mysql: Out of memory (Needed 8160 bytes)
> ERROR 2008: MySQL client run out of memory
> 
> and also it disconnects me from the database that I was usinq and I have
> to logi in again.
> 
> Any Ideas?
> 
> Ajdin

I do not know the exact sizes or structure of your tables, but when you
join 3 even relatively small tables, you need to be very careful about
properly writing where clause so that it will be sufficiently
contraining. Otherwise, you may end with the number of records equal to
the product of the sizes of all tables, which could be a very large
number.

-- 
Sasha Pachev
http://www.sashanet.com
Thread
Question: how to count unique rows in multiple tables?Kelly Yancey22 Apr
Re: Question: how to count unique rows in multiple tables?Tomislav Petrovic23 Apr
  • Problem executing query, a bug perhaps?A. Brandic26 Apr
    • Re: Problem executing query, a bug perhaps?Jules Bean26 Apr
      • Re: Problem executing query, a bug perhaps?A. Brandic26 Apr
      • Re: Problem executing query, a bug perhaps?A. Brandic26 Apr
        • Re: Problem executing query, a bug perhaps?Jules Bean26 Apr
    • Re: Problem executing query, a bug perhaps?Sasha Pachev26 Apr