Optimize Database after Deleting Revisions - Version 2.7.5

Version Description

[12/13/2013] = * CHANGE: two queries optimized for better performance

Download this release

Release Info

Developer cageehv
Plugin Icon 128x128 Optimize Database after Deleting Revisions
Version 2.7.5
Comparing to
See all releases

Code changes from version 2.7.4 to 2.7.5

Files changed (2) hide show
  1. readme.txt +6 -3
  2. rvg-optimize-db.php +9 -7
readme.txt CHANGED
@@ -7,9 +7,9 @@ Tags: database, delete, revisions, optimize, post, posts, page, pages, clean, cl
7
  Author URI: http://cagewebdev.com
8
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
9
  Requires at least: 2.0
10
- Tested up to: 3.7.1
11
- Stable tag: 2.7.4
12
- Version: 2.7.4
13
 
14
  == Description ==
15
 
@@ -54,6 +54,9 @@ No warranty, use at own risk!
54
 
55
  == Changelog ==
56
 
 
 
 
57
  = 2.7.4 [12/11/2013] =
58
  * BUG FIX: added 'backticks' around the database name in a few queries
59
 
7
  Author URI: http://cagewebdev.com
8
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
9
  Requires at least: 2.0
10
+ Tested up to: 3.8
11
+ Stable tag: 2.7.5
12
+ Version: 2.7.5
13
 
14
  == Description ==
15
 
54
 
55
  == Changelog ==
56
 
57
+ = 2.7.5 [12/13/2013] =
58
+ * CHANGE: two queries optimized for better performance
59
+
60
  = 2.7.4 [12/11/2013] =
61
  * BUG FIX: added 'backticks' around the database name in a few queries
62
 
rvg-optimize-db.php CHANGED
@@ -1,16 +1,16 @@
1
  <?php
2
- $odb_version = '2.7.4';
3
- $odb_release_date = '12/11/2013';
4
  /**
5
  * @package Optimize Database after Deleting Revisions
6
- * @version 2.7.4
7
  */
8
  /*
9
  Plugin Name: Optimize Database after Deleting Revisions
10
  Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-revisions-wordpress-plugin/
11
  Description: Optimizes the Wordpress Database after Cleaning it out - <a href="options-general.php?page=rvg_odb_admin"><strong>plug in options</strong></a>
12
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
13
- Version: 2.7.4
14
  Author URI: http://cagewebdev.com
15
  */
16
  ?>
@@ -1375,13 +1375,14 @@ function rvg_optimize_tables($display)
1375
  $query = "OPTIMIZE TABLE ".$row[0];
1376
  $result = $wpdb -> get_results($query);
1377
 
 
1378
  $sql = "
1379
  SELECT engine, (
1380
  data_length + index_length
1381
  ) AS size, table_rows
1382
  FROM information_schema.TABLES
1383
- WHERE LCase( table_schema ) = LCase( '".DB_NAME."' )
1384
- AND table_name = '".$row[0]."'
1385
  ";
1386
 
1387
  $table_info = $wpdb -> get_results($sql);
@@ -1623,10 +1624,11 @@ function rvg_get_db_size()
1623
  {
1624
  global $wpdb;
1625
 
 
1626
  $sql = "
1627
  SELECT SUM( data_length + index_length ) size
1628
  FROM information_schema.TABLES
1629
- WHERE LCase( table_schema ) = LCase( '".DB_NAME."' )
1630
  GROUP BY table_schema
1631
  ";
1632
 
1
  <?php
2
+ $odb_version = '2.7.5';
3
+ $odb_release_date = '12/13/2013';
4
  /**
5
  * @package Optimize Database after Deleting Revisions
6
+ * @version 2.7.5
7
  */
8
  /*
9
  Plugin Name: Optimize Database after Deleting Revisions
10
  Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-revisions-wordpress-plugin/
11
  Description: Optimizes the Wordpress Database after Cleaning it out - <a href="options-general.php?page=rvg_odb_admin"><strong>plug in options</strong></a>
12
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
13
+ Version: 2.7.5
14
  Author URI: http://cagewebdev.com
15
  */
16
  ?>
1375
  $query = "OPTIMIZE TABLE ".$row[0];
1376
  $result = $wpdb -> get_results($query);
1377
 
1378
+ // v2.7.5
1379
  $sql = "
1380
  SELECT engine, (
1381
  data_length + index_length
1382
  ) AS size, table_rows
1383
  FROM information_schema.TABLES
1384
+ WHERE table_schema = '".strtolower(DB_NAME)."'
1385
+ AND table_name = '".$row[0]."'
1386
  ";
1387
 
1388
  $table_info = $wpdb -> get_results($sql);
1624
  {
1625
  global $wpdb;
1626
 
1627
+ // v2.7.5
1628
  $sql = "
1629
  SELECT SUM( data_length + index_length ) size
1630
  FROM information_schema.TABLES
1631
+ WHERE table_schema = '".strtolower(DB_NAME)."'
1632
  GROUP BY table_schema
1633
  ";
1634