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 question | Hermann-marcus Behrens | 24 Jun |
• Re: SELECT question | Benjamin Pflugmann | 26 Jun |