2006/6/20, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Hi All,
I am using INNODB.I have a delete quetry something like this :
delete from modnaptrrecord_zone where modnaptrrecord_zone.modnaptrrecord_id in
(593536 ,593537 ,593538 ,593539 ,593540 ) and
modnaptrrecord_zone.modnaptrrecord_i
You're hard-coding ten thousand discrete
values between the two IN clauses?? I'm not sure how MySQL processes a query
like that but I can imagine that the performance would not be good. Frankly, I
am:
a) suprised that you had the patience
to type in all of those values (and verify that you
Taking a blind stab, how about..
SELECT a.name, minimum(0,COUNT(b.id)) as votes FROM poll_options as a LEFT
JOIN poll_votes as b on a.id=b.oid
WHERE b.pid='' GROUP BY b.oid
Ryan Fox
- Original Message -
From: "Blaster" <[EMAIL PROTECTED]>
> However! Here comes the problem, if no vote is
LEFT JOIN
On Sat, 11 Jan 2003 18:35:44 +0100, Blaster used a few
recycled electrons to form:
| Hey,
|
| (this post is pretty long, a short version of the problem is listed at the
| bottom if you don't like reading long emails :P)
|
| I'm currently going through all my SQL queries for my webpa
You might have to tweak the following a bit for syntax:
SELECT a.name, COUNT(b.id) as votes FROM poll_options as a LEFT JOIN
poll_votes as b ON a.id=b.oid
WHERE b.pid='' GROUP BY b.oid
Also, you can refer to:
http://www.mysql.com/doc/en/JOIN.html
Bhavin.
- Original Message -
From: "
Dean Ware writes:
> Excellent!
>
> By changing the order of the tables being joined I reduced the execution
> time from 2800ms to 20ms!
>
> Very useful command.
>
> Thanks very much!
>
Keep in mind you can help MySQL a lot by setting STRAIGHT_JOIN, to
make it sure that MySQL honors the table
Excellent!
By changing the order of the tables being joined I reduced the execution
time from 2800ms to 20ms!
Very useful command.
Thanks very much!
At 14:20 29/06/2001 -0300, you wrote:
>Are the fields been JOINed indexed? If not, they should.
>
>Have you tried an EXPLAIN command? Try it li