From: Sasha Pachev Date: April 26 1999 2:49pm Subject: Re: Problem executing query, a bug perhaps? List-Archive: http://lists.mysql.com/mysql/2400 Message-Id: <37247D08.A5869D6D@direct1.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "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