]> git.joonet.de Git - adminer.git/commitdiff
SELECT COUNT(*) is slow in InnoDB
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 13 Jan 2009 15:22:36 +0000 (15:22 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 13 Jan 2009 15:22:36 +0000 (15:22 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@547 7c3ca157-0c34-0410-bff1-cbf682f78f5c

index.php
lang/cs.inc.php
lang/de.inc.php
lang/es.inc.php
lang/et.inc.php
lang/fr.inc.php
lang/it.inc.php
lang/nl.inc.php
lang/sk.inc.php
lang/zh.inc.php

index 2bd1ed1ad6a22b7b6fea60e2ec07d000e680bbd2..c1fe02a051072f4151dddc5f43b78bd4df57a2b5 100644 (file)
--- a/index.php
+++ b/index.php
@@ -185,10 +185,10 @@ if (isset($_GET["download"])) {
                                echo '<thead><tr><td><input type="checkbox" onclick="var elems = this.form.elements; for (var i=0; elems.length > i; i++) if (elems[i].name == \'tables[]\') elems[i].checked = this.checked;" /></td><th>' . lang('Table') . '</th><td>' . lang('Engine') . '</td><td>' . lang('Comment') . '</td><td>' . lang('Collation') . '</td><td>' . lang('Data Length') . '</td><td>' . lang('Index Length') . '</td><td>' . lang('Data Free') . '</td><td>' . lang('Auto Increment') . '</td><td>' . lang('Rows') . "</td></tr></thead>\n";
                                while ($row = $result->fetch_assoc()) {
                                        table_comment($row);
-                                       echo '<tr class="nowrap"><td>' . (isset($row["Rows"]) ? '<input type="checkbox" name="tables[]" value="' . htmlspecialchars($row["Name"]) . '"' . (in_array($row["Name"], (array) $_POST["tables"], true) ? ' checked="checked"' : '') . ' /></td><th><a href="' . htmlspecialchars($SELF) . 'table=' . urlencode($row["Name"]) . '">' . htmlspecialchars($row["Name"]) . "</a></th><td>$row[Engine]</td><td>" . htmlspecialchars($row["Comment"]) . "</td><td>$row[Collation]" : '&nbsp;</td><th><a href="' . htmlspecialchars($SELF) . 'view=' . urlencode($row["Name"]) . '">' . htmlspecialchars($row["Name"]) . '</a></th><td colspan="7">' . lang('View'));
-                                       $row["count"] = $mysql->result($mysql->query("SELECT COUNT(*) FROM " . idf_escape($row["Name"])));
-                                       foreach ((isset($row["Rows"]) ? array("Data_length" => "create", "Index_length" => "indexes", "Data_free" => "edit", "Auto_increment" => "create") : array()) + array("count" => "select") as $key => $link) {
-                                               echo '</td><td align="right">' . (strlen($row[$key]) ? '<a href="' . htmlspecialchars("$SELF$link=") . urlencode($row["Name"]) . '">' . number_format($row[$key], 0, '.', lang(',')) . '</a>' : '&nbsp;');
+                                       echo '<tr class="nowrap"><td>' . (isset($row["Rows"]) ? '<input type="checkbox" name="tables[]" value="' . htmlspecialchars($row["Name"]) . '"' . (in_array($row["Name"], (array) $_POST["tables"], true) ? ' checked="checked"' : '') . ' /></td><th><a href="' . htmlspecialchars($SELF) . 'table=' . urlencode($row["Name"]) . '">' . htmlspecialchars($row["Name"]) . "</a></th><td>$row[Engine]</td><td>" . htmlspecialchars($row["Comment"]) . "</td><td>$row[Collation]" : '&nbsp;</td><th><a href="' . htmlspecialchars($SELF) . 'view=' . urlencode($row["Name"]) . '">' . htmlspecialchars($row["Name"]) . '</a></th><td colspan="8"><a href="' . htmlspecialchars($SELF) . "select=" . urlencode($row["Name"]) . '">' . lang('View') . '</a>');
+                                       foreach ((isset($row["Rows"]) ? array("Data_length" => "create", "Index_length" => "indexes", "Data_free" => "edit", "Auto_increment" => "create", "Rows" => "select") : array()) as $key => $link) {
+                                               $val = number_format($row[$key], 0, '.', lang(','));
+                                               echo '</td><td align="right">' . (strlen($row[$key]) ? '<a href="' . htmlspecialchars("$SELF$link=") . urlencode($row["Name"]) . '">' . ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? lang('around %s', $val) : $val) . '</a>' : '&nbsp;');
                                        }
                                        echo "</td></tr>\n";
                                }
index d97ff8a829845cd82faafd6ba405bed018de0b2b..6a71e058eeafd5e8692a0ceafba45ffa992f586f 100644 (file)
@@ -136,6 +136,7 @@ $translations = array(
        'Event' => 'Událost',
        'MySQL version: %s through PHP extension %s' => 'Verze MySQL: %s přes PHP extenzi %s',
        '%d row(s)' => array('%d řádek', '%d řádky', '%d řádků'),
+       'around %s' => 'přibližně %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'Při změně aktuální čas',
        'Remove' => 'Odebrat',
        'Are you sure?' => 'Opravdu?',
index 3b266a664eaf6d736216a11a3e11708c019261ee..4e683db4e3fe20d05d794b0794a1d1e6520c7ff6 100644 (file)
@@ -136,6 +136,7 @@ $translations = array(
        'Event' => 'Ereignis',
        'MySQL version: %s through PHP extension %s' => 'Version MySQL: %s, mit PHP-Erweiterung %s',
        '%d row(s)' => array('%d Datensatz', '%d Datensätze'),
+       'around %s' => 'ungefähren %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
        'Remove' => 'Entfernen',
        'Are you sure?' => 'Sind Sie sicher ?',
index 0a84679dc7b85ef14bda47a6d2345f3d1ca03800..b0ee07fd1a23d77463efeeddf527efc8f576064a 100644 (file)
@@ -136,6 +136,7 @@ $translations = array(
        'Event' => 'Evento',
        'MySQL version: %s through PHP extension %s' => 'Versión MySQL: %s a través de extensión PHP %s',
        '%d row(s)' => array('%d fila', '%d filas'),
+       'around %s' => 'acaso %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
        'Remove' => 'Eliminar',
        'Are you sure?' => 'Está seguro?',
index 407fefe8b936387195dab4fc4eaf993beaa04b31..5cc19a13d7b6f9813fac2007bc1b3406d715ca93 100644 (file)
@@ -135,6 +135,7 @@ $translations = array(
        'Time' => 'Aeg',
        'Event' => 'Sündmus',
        '%d row(s)' => array('%d rida', '%d rida'),
+       'around %s' => 'umbes %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
        'Remove' => 'Eemalda',
        'Are you sure?' => 'Kas oled kindel?',
index 480f69bb608b8fd31817c7e66ee2f05a53c36231..37d1e5e51b9e8c60428de7bcc36796235bb650f6 100644 (file)
@@ -135,6 +135,7 @@ $translations = array(
        'Time' => 'Temps',
        'Event' => 'Évènement',
        '%d row(s)' => array('%d ligne', '%d lignes'),
+       'around %s' => 'autour %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
        'Remove' => 'Effacer',
        'Are you sure?' => 'Êtes-vous certain?',
index 1aacfa5425e166ca174c40029a74e0b0cffd4a41..6cbebf147f38f26f43ab595ee86b50f61a58c5ef 100644 (file)
@@ -136,6 +136,7 @@ $translations = array(
        'Event' => 'Evento',
        'MySQL version: %s through PHP extension %s' => 'Versione MySQL: %s via estensione PHP %s',
        '%d row(s)' => array('%d riga', '%d righe'),
+       'around %s' => 'su %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
        'Remove' => 'Rimuovi',
        'Are you sure?' => 'Sicuro?',
index 4153fd46a411282b49f301b1221c31b01b50a177..f0136521852608c2e1d9b8d8c6205e6e27d74b7f 100644 (file)
@@ -136,6 +136,7 @@ $translations = array(
        'Event' => 'Event',
        'MySQL version: %s through PHP extension %s' => 'MySQL versie: %s met PHP extensie %s',
        '%d row(s)' => array('%d rij', '%d rijen'),
+       'around %s' => 'ongeveer %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
        'Remove' => 'Verwijderen',
        'Are you sure?' => 'Weet u het zeker?',
index 2dd97a49f6713a41aae7eed1d7d84ff859a7e31d..8f80168af42b22a281e41a2858bc8267d3ffbee5 100644 (file)
@@ -136,6 +136,7 @@ $translations = array(
        'Event' => 'Udalosť',
        'MySQL version: %s through PHP extension %s' => 'Verzia MySQL: %s cez PHP rozšírenie %s',
        '%d row(s)' => array('%d riadok', '%d riadky', '%d riadkov'),
+       'around %s' => 'približne %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'Pri zmene aktuálny čas',
        'Remove' => 'Odobrať',
        'Are you sure?' => 'Naozaj?',
index ae4f26535b772d378ed7ae539bf5adac47246ace..aba3eb4eba9544c39885bee2478f450d3857bf6e 100644 (file)
@@ -136,6 +136,7 @@ $translations = array(
        'Event' => '事件',
        'MySQL version: %s through PHP extension %s' => 'MySQL 版本: %s 通过 PHP 扩展 %s',
        '%d row(s)' => '%d 行',
+       'around %s' => '附近的 %s',
        'ON UPDATE CURRENT_TIMESTAMP' => 'ON UPDATE CURRENT_TIMESTAMP',
        'Remove' => '移除',
        'Are you sure?' => '你确定吗?',