gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/cronjobs massmail.php,1.15,1.16


From: tom
Subject: [Gforge-commits] gforge/cronjobs massmail.php,1.15,1.16
Date: Tue, 07 Dec 2004 09:27:37 -0600

Update of /cvsroot/gforge/gforge/cronjobs
In directory db.perdue.net:/tmp/cvs-serv10597

Modified Files:
        massmail.php 
Log Message:
Deleted comment which was incorrect; an uncorrelated subquery is indeed about 
30% faster in this case

Index: massmail.php
===================================================================
RCS file: /cvsroot/gforge/gforge/cronjobs/massmail.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- massmail.php        21 Oct 2004 18:54:20 -0000      1.15
+++ massmail.php        7 Dec 2004 15:27:35 -0000       1.16
@@ -103,11 +103,6 @@
 
 //$err .= "Got mail to send: ".$subj."\n";
 
-// While using DISTINCT is usually evil (because you're fetching rows
-// and then discarding them), in this case it's actually good.  Running 
-// EXPLAIN ANALYZE on this query on my GForge server (1000 users, 380 
projects) 
-// shows that it takes about 25 ms.  But after rewriting it to use an 
uncorrelated subquery,
-// it takes around 650 ms.  So I think we'll leave it the way it is :-)
 $sql = "SELECT DISTINCT 
users.user_id,users.user_name,users.realname,users.email,users.confirm_hash
        FROM $table_mapping[$type]
        WHERE users.user_id>".db_result($mail_res, 0, 'last_userid')."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]