On Fri, Jan 26, 2001 at 12:42:51PM +1300, Quentin Bennett wrote:
> Hi,
> 
> how about
> 
> select fname, c1.cname, c2.cname, c3.cname from 
> firms, 
> cityname as c1,
> cityname as c2,
> cityname as c3
> where
> first.city0 = c1.id and
> first.city1 = c2.id and
> first.city2 = c3.id;
> 
> CC'ing the dialogue to the list lets us know that you have received the
> first reply, and what you made of it, allowing others, like me, to suggest
> other solutions.

Hmmm ;-) Nice. I haven't known anything on using table aliases till now :)
I've just implemented it. Only one disadvantage: the speed. My table has
got six indexed bigints to point to the cityname table and one indexed
bigint for pointing to another table. The main table has got about
8000 rows. A simple count(*) expression takes about 10-20 seconds to be
done on my AMD K6-II 400Mhz 64M ram computer (IDE disk transfer speed is
11.11Mb/s according my hdparm utility).

Thanks for the help anyway :)

- Gabor

 --[ Gábor Lénárt ]---[ Vivendi Telecom Hungary ]--[ [EMAIL PROTECTED] ]--
 U have 8 bit comp or chip of them and it's unused or to be sold? Call me!
 -------[ +36 30 2270823 ]------> LGB <-----[ Linux/UNIX/8bit 4ever ]-----

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to