sql sorgusunun büyük olması

Tüm soru(n)lar ve tartışmalar; kullanım ile ilgili soru(n)lar.

sql sorgusunun büyük olması

İleti EFE03 18.12.2006, 20:09

SQL Queries = 14347

akadaslar bu sayı büyüyor.ve büyüdükce site yavaslıyor.nasıl düzeltebilirim
EFE03
Üye
Üye
 
İleti: 302
Kayıt: 09.06.2006, 07:37

İleti Simuzer 18.12.2006, 20:58

Gereksiz modları kaldırman gerekir. Bir de kullanmadığın phpbb'nin kendisinde olan bir özellik dahi olsa, onun sorgulamalarını da kırpmalısın.
Kullanıcı avatarı
Simuzer
Geliştirme Grubu
Geliştirme Grubu
 
İleti: 669
Kayıt: 09.11.2005, 09:34
Konum: İstanbul

İleti AlleRGy 18.12.2006, 23:02

color group için fix vardı onu yap.
Kullanıcı avatarı
AlleRGy
Üye
Üye
 
İleti: 95
Kayıt: 17.05.2006, 20:28
Konum: Denizli

İleti CrazYAngeR 19.12.2006, 02:25

üstat adamın colour group kullandığını nerden anladın :?
Kullanıcı avatarı
CrazYAngeR
Üye
Üye
 
İleti: 262
Kayıt: 13.06.2006, 00:34
Konum: İstanbul

İleti asdf29 19.12.2006, 11:00

AlleRGy yazdı:color group için fix vardı onu yap.


nasıl yapabiliriz onu.. :?
Kullanıcı avatarı
asdf29
Üye
Üye
 
İleti: 206
Kayıt: 24.03.2006, 15:05

İleti BaRCeLoNa 19.12.2006, 21:55

Efe03 Cache Genaration mod mu kurulu ? + Yakushada en az Vistada kurulu olan modlar kadar mod var ama yakusha sitelerinde sql sorgusu 24 - 50 arası gidip gelirken bende *edited* kurulu 350 - 550 arasında değişiyor... Bunun bir Yolu olmalı :) @Sabriden dinlesek anlarız heralde ...
barcelona tema v 1.0 %40 [ l l l l l l l l l ]
http://www.forumuni.com
Kullanıcı avatarı
BaRCeLoNa
Üye
Üye
 
İleti: 271
Kayıt: 16.05.2006, 23:26
Konum: İzmir

İleti AlleRGy 20.12.2006, 18:29

benim dediğimi yapın.color groups varsa fixini kurun.bende 300 lerde olan sorgu 20 yi geçmiyor simdi.
Kullanıcı avatarı
AlleRGy
Üye
Üye
 
İleti: 95
Kayıt: 17.05.2006, 20:28
Konum: Denizli

İleti

ALEXIS
21.12.2006, 21:13

fix nerede ?
Kullanıcı avatarı
ALEXIS
Site Yöneticisi
Site Yöneticisi
 
İleti: 2563
Kayıt: 30.06.2005, 09:08

Cvp: sql sorgusunun büyük olması

İleti EFE03 23.12.2006, 20:50

sayın alexis ben fixi buldum.ama bir sorunum var

fix söyle;

Kod: Tümünü seç
#
#-----[ AÇ ]-----
#

includes/functions_color_groups.php

#
#-----[ BUL ]-----
#

function color_group_colorize_name($user_id, $no_profile = false)
{
   global $board_config, $phpEx, $db, $phpbb_root_path;
   
   static $cacheUsers;
   
   // First see if the user is Anon
   if ($user_id != ANONYMOUS)
   {
      if (!isset($cacheUsers[$user_id]))
      {
         // Get the user info and see if they are assigned a color_group //
         $sql = 'SELECT u.user_color_group, u.username, c.* FROM ' . USERS_TABLE . ' u, ' . COLOR_GROUPS_TABLE . " c
         WHERE u.user_id = $user_id
         AND u.user_color_group = c.group_id";
         $result = $db->sql_query($sql);
         $row = $db->sql_fetchrow($result);
         if (!isset($row['username']))
         {
            //If there was a problem before, we don't want a blank username!
            $sql = 'SELECT username FROM ' . USERS_TABLE . "
               WHERE user_id = $user_id";
            $result = $db->sql_query($sql);
            $row = $db->sql_fetchrow($result);
         }
         $cacheUsers[$user_id]['username'] = $row['username'];

         if (isset($row['group_color']))
         {
            // WE found the highest level color, head out now //
            $cacheUsers[$user_id]['group_color'] = stripslashes($row['group_color']);
         }
         else
         {
            // Now start looking for user group memberships //
            $sql = 'SELECT c.* FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u, ' . COLOR_GROUPS_TABLE . ' c, ' . GROUPS_TABLE . ' g
            WHERE ug.user_id = ' . $user_id . '
            AND u.user_id = ug.user_id
            AND ug.group_id = g.group_id
            AND g.group_color_group = c.group_id
            AND g.group_single_user = 0
            ORDER BY c.order_num ASC LIMIT 1';
            //print $sql;
            $result = $db->sql_query($sql);
            $curr = 10000000000000;
            $style_color = '';
            while ($row = $db->sql_fetchrow($result))
            {
               // If our new group in the list is a higher order number, it's color takes precedence //
               if ($row['order_num'] < $curr)
               {
                  $curr = $row['order_num'];
                  $cacheUsers[$user_id]['group_color'] = stripslashes($row['group_color']);
               }
            }
         }
      }

$style_color = 'style="font-weight:bold;color:' . $cacheUsers[$user_id]['group_color'] . '"';
      $username = $cacheUsers[$user_id]['username'];
      // Make the profile link or no and return it //
      if ($no_profile)
      {
         $user_link = "<span $style_color>$username</span>";
      }
      else
      {
         $user_link = '<a href="' . append_sid($phpbb_root_path."profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id") . '"' . $style_color .'>' . $username . '</a>';
      }
      return($user_link);
   }
   else
   {
      return false;
   }
}

#
#-----[ BUNUNLA DEGISTIR ]-----
#

function color_group_colorize_name($user_id, $no_profile = false)
{
   global $board_config, $phpEx, $db, $phpbb_root_path, $colorusers, $coloruname, $colorgroup;
   
   // First see if the user is Anon
   if ($user_id != ANONYMOUS)
   {
      $username = $coloruname[$user_id];
      if ( $colorusers[$user_id] != 0 )
      {
         // Get the user info and see if they are assigned a color_group //
         $sql = 'SELECT u.user_color_group, u.username, c.* FROM ' . USERS_TABLE . ' u, ' . COLOR_GROUPS_TABLE . " c
            WHERE u.user_id = $user_id
            AND u.user_color_group = c.group_id";
         $result = $db->sql_query($sql);
         $row = $db->sql_fetchrow($result);

      }
     
      if (isset($row['group_color']))
      {
         // WE found the highest level color, head out now //
         $style_color = 'style="font-weight:bold;color:' . $row['group_color'] . '"';
      }
      else
      {
         if ( in_array($user_id, $colorgroup) )
         {
            // Now start looking for user group memberships //
            $sql = 'SELECT c.* FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u, ' . COLOR_GROUPS_TABLE . ' c, ' . GROUPS_TABLE . ' g
               WHERE ug.user_id = ' . $user_id . '
               AND u.user_id = ug.user_id
               AND ug.group_id = g.group_id
               AND g.group_color_group = c.group_id
               AND g.group_single_user = 0';
            //print $sql;
               $result = $db->sql_query($sql);
               $curr = 10000000000000;
               $style_color = '';
               while ($row = $db->sql_fetchrow($result))
               {
                  // If our new group in the list is a higher order number, it's color takes precedence //
                  if ($row['order_num'] < $curr)
                  {
                     $curr = $row['order_num'];
                     $style_color = 'style="font-weight:bold;color:' . $row['group_color'] . '"';
                  }
               }
         }
      }
     
      // Make the profile link or no and return it //
      if ($no_profile)
      {
         $user_link = "<span $style_color>$username</span>";
      }
      else
      {
         $user_link = '<a href="' . append_sid($phpbb_root_path."profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id") . '"' . $style_color .'>' . $username . '</a>';
      }
      return($user_link);
   }
   else
   {
      $username = $coloruname[$user_id];
      if ($no_profile)
      {
         $user_link = "<span $style_color>$username</span>";
      }
      else
      {
         $user_link = '<a href="' . append_sid($phpbb_root_path."profile.php?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id") . '"' . $style_color .'>' . $username . '</a>';
      }
      return $username;
   }
}

#
#-----[ AÇ ]-----
#

common.php
 
#
#-----[ BUL ]-----
#

//
// Show 'Board is disabled' message if needed.
//

#
#-----[ ÖNCESINE EKLE ]-----
#

$sql = "SELECT user_id, user_color_group, username FROM " . USERS_TABLE;
if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not read user color groups', '', __LINE__, __FILE__, $sql);
}

$colorusers = array();
$coloruname = array();
while ( $row = $db->sql_fetchrow($result) )
{
   $userid = $row['user_id'];
   $colorusers[$userid] = $row['user_color_group'];
   $coloruname[$userid] = $row['username'];
}

$colorgroup = array();

$sql = "SELECT ug.user_id FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
   WHERE g.group_single_user = 0
   AND g.group_id = ug.group_id
   GROUP BY ug.user_id
   ORDER BY ug.user_id";
if( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not read user color groups', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
   $colorgroup[] = $row['user_id'];
}

#
#-----[ TÜM DOSYALARI KAPAT/KAYDET ]-----
#
SoN


benim sorunum ise;
internet explorer adlı tarayıcıda en üst açılıyor.geriye kalan kısmı 10-20 saniye arasında açılıyo

opera ve ferorox da ise uçuyor.şimşek gibi
EFE03
Üye
Üye
 
İleti: 302
Kayıt: 09.06.2006, 07:37


Soru(n)lar & Tartışmalar



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron