MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Hermann-marcus Behrens Date:June 24 1999 12:08am
Subject:SELECT question
View as plain text  
Hello,

i have an address-table and a table with various images. Sometimes an
address-entry has no
images, sometimes it has many. Now i would like to make a quere and to see
the number of images for each
selected row.

I'm using a select like this:

SELECT address.id, address.name, COUNT(images.fi)
FROM address
LEFT JOIN images ON images.fi = address.id
WHERE address.id > 50 and address.id < 1000
GROUP BY images.id

On my computer a search like this is *much* slower, than without
"COUNT(images.fi) and LEFT JOIN".
Any suggestions for a quicker select ?


thanks,
 Hermi

Thread
SELECT questionHermann-marcus Behrens24 Jun
  • Re: SELECT questionBenjamin Pflugmann26 Jun