[geeklog-hg] geeklog: Improved speed of query that lists articles for front p...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Fri Sep 7 12:56:23 EDT 2012


changeset 8805:c1139c1e9df3
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/c1139c1e9df3
user: Tom <websitemaster at cogeco.net>
date: Fri Sep 07 12:17:13 2012 -0400
description:
Improved speed of query that lists articles for front page and topics.

diffstat:

 public_html/index.php |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 49b9f0c412ee -r c1139c1e9df3 public_html/index.php
--- a/public_html/index.php	Thu Sep 06 00:14:50 2012 +0900
+++ b/public_html/index.php	Fri Sep 07 12:17:13 2012 -0400
@@ -241,7 +241,7 @@
 }
 
 $msql = array(); 
-$msql['mysql']="SELECT STRAIGHT_JOIN s.*, ta.tid, UNIX_TIMESTAMP(s.date) AS unixdate, "
+$msql['mysql']="SELECT s.*, ta.tid, UNIX_TIMESTAMP(s.date) AS unixdate, "
          . 'UNIX_TIMESTAMP(s.expire) as expireunix, '
          . $userfields . ", t.topic, t.imageurl "
          . "FROM {$_TABLES['stories']} AS s, {$_TABLES['topic_assignments']} AS ta,{$_TABLES['users']} AS u, "
@@ -249,7 +249,7 @@
          . " ta.type = 'article' AND ta.id = s.sid AND"
          . $sql . " GROUP BY s.sid ORDER BY featured DESC, date DESC LIMIT $offset, $limit";
 
-$msql['mssql']="SELECT STRAIGHT_JOIN s.sid, s.uid, s.draft_flag, ta.tid, s.date, s.title, cast(s.introtext as text) as introtext, cast(s.bodytext as text) as bodytext, s.hits, s.numemails, s.comments, s.trackbacks, s.related, s.featured, s.show_topic_icon, s.commentcode, s.trackbackcode, s.statuscode, s.expire, s.postmode, s.frontpage, s.owner_id, s.group_id, s.perm_owner, s.perm_group, s.perm_members, s.perm_anon, s.advanced_editor_mode, "
+$msql['mssql']="SELECT s.sid, s.uid, s.draft_flag, ta.tid, s.date, s.title, cast(s.introtext as text) as introtext, cast(s.bodytext as text) as bodytext, s.hits, s.numemails, s.comments, s.trackbacks, s.related, s.featured, s.show_topic_icon, s.commentcode, s.trackbackcode, s.statuscode, s.expire, s.postmode, s.frontpage, s.owner_id, s.group_id, s.perm_owner, s.perm_group, s.perm_members, s.perm_anon, s.advanced_editor_mode, "
          . " UNIX_TIMESTAMP(s.date) AS unixdate, "
          . 'UNIX_TIMESTAMP(s.expire) as expireunix, '
          . $userfields . ", t.topic, t.imageurl "



More information about the geeklog-cvs mailing list