<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1257"> <META content="MSHTML 6.00.6000.16788" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>40s nesamon.... Arba serveriu dirba tavo mobilka arba indeks nra arba terabaitin duombaz...</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV>"tobias" <<A href="mailto:oracullusTRINAM@yahoo.com">oracullusTRINAM@yahoo.com</A>> wrote in message <A href="news:gmc593$9aa$1@trimpas.omnitel.net">news:gmc593$9aa$1@trimpas.omnitel.net</A>...</DIV>kaip optimizuoti mysql query - jei jis vykdomas 40 sekundziu!<BR>jokiu fokusu nedarau<BR>paselektinu straipnio id, headline,<BR>is komentaru lenteles suskaiciuoju komentaru skaiciu<BR><BR>aciu uz komentarus<BR><BR><BR> SELECT articles.id,<BR> articles.title,<BR> articles.date,<BR> DATE_FORMAT(date,'%m/%d, %Y') as ArticleDate,<BR> articles.selected_foto,<BR> articles.foto_1,<BR> articles.foto_source,<BR> REPLACE(articles.source, ',', ' ') as source,<BR> LEFT(articles.article,350) as article_intro,<BR> COUNT(comments.id) as artComments<BR> FROM articles<BR> LEFT JOIN comments ON articles.id = comments.object_id<BR> WHERE articles.active = '1'<BR> AND articles.category = '21'<BR> GROUP BY articles.id<BR> ORDER BY articles.id<BR> DESC<BR> LIMIT 5 <BR><BR></BLOCKQUOTE></BODY></HTML>