<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,8 +2,12 @@
 .*.swp
 .py*
 *~
+*.patch
+*.old
 .pydevproject
 .project
 .settings
+.directory
 doc/
 dist/
+www/</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -284,7 +284,9 @@ def desc(db, objectName, completeMethod=None, printComment=True, sort=False):
     # Displays some statistics about the object
     if oraObject.getType() in (&quot;TABLE&quot;, &quot;TABLE PARTITION&quot;):
         print ORANGE+_(&quot;Last analyzed on: &quot;)+str(oraObject.getLastAnalyzed(db))+RESET
-        print ORANGE+_(&quot;Est. nb rows\t: &quot;)+str(oraObject.getNumRows(db))+RESET
+        print ORANGE+_(&quot;Nb rows\t\t: &quot;)+str(oraObject.getNumRows(db))+RESET
+        print ORANGE+_(&quot;Nb used blocks\t: &quot;)+str(oraObject.getUsedBlocks(db))+RESET
+        print ORANGE+_(&quot;Avg row length\t: &quot;)+str(oraObject.getAvgRowLength(db))+RESET
 
     # Evaluates object type (among the 24 defined)
     if oraObject.getType() in (&quot;TABLE&quot; , &quot;TABLE PARTITION&quot;):</diff>
      <filename>src/pysql/pysqlfunctions.py</filename>
    </modified>
    <modified>
      <diff>@@ -722,6 +722,30 @@ class OraTable(OraTabular, OraSegment):
         else:
             return result[0][0]
 
+    def getAvgRowLength(self, db):
+        &quot;&quot;&quot;Gets average length of a single row from table's statistics&quot;&quot;&quot;
+        if self.getOwner()==&quot;&quot;:
+            owner=db.getUsername().upper()
+        else:
+            owner=self.getOwner()
+        result=db.executeAll(tableSql[&quot;avgRowLengthFromOwnerAndName&quot;], [owner, self.getName()])
+        if len(result)==0:
+            return &quot;&quot;
+        else:
+            return result[0][0]
+
+    def getUsedBlocks(self, db):
+        &quot;&quot;&quot;Gets number of used blocks from table's statistics&quot;&quot;&quot;
+        if self.getOwner()==&quot;&quot;:
+            owner=db.getUsername().upper()
+        else:
+            owner=self.getOwner()
+        result=db.executeAll(tableSql[&quot;usedBlocksFromOwnerAndName&quot;], [owner, self.getName()])
+        if len(result)==0:
+            return &quot;&quot;
+        else:
+            return result[0][0]
+
 class OraTablespace(OraObject):
     &quot;&quot;&quot;Tablespace&quot;&quot;&quot;
 </diff>
      <filename>src/pysql/pysqloraobjects.py</filename>
    </modified>
    <modified>
      <diff>@@ -187,13 +187,21 @@ tableSql={
                                               and cons.table_name=col.table_name
                                               and col.constraint_name=cons.constraint_name
                                               order by col.position&quot;&quot;&quot;,
-    &quot;lastAnalyzedFromOwnerAndName&quot;       :    u&quot;&quot;&quot;select last_analyzed
+    &quot;lastAnalyzedFromOwnerAndName&quot;  :    u&quot;&quot;&quot;select last_analyzed
                                               from all_tab_statistics
                                               where owner=:1
                                               and table_name=:2&quot;&quot;&quot;,
     &quot;numRowsFromOwnerAndName&quot;       :    u&quot;&quot;&quot;select num_rows
                                               from all_tab_statistics
                                               where owner=:1
+                                              and table_name=:2&quot;&quot;&quot;,
+    &quot;avgRowLengthFromOwnerAndName&quot;  :    u&quot;&quot;&quot;select avg_row_len
+                                              from all_tab_statistics
+                                              where owner=:1
+                                              and table_name=:2&quot;&quot;&quot;,
+    &quot;usedBlocksFromOwnerAndName&quot;    :    u&quot;&quot;&quot;select blocks
+                                              from all_tab_statistics
+                                              where owner=:1
                                               and table_name=:2&quot;&quot;&quot;
     }
 </diff>
      <filename>src/pysql/pysqlqueries.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>589c75fdf93825b2712bc18f8164ccc5cf352d3d</id>
    </parent>
  </parents>
  <author>
    <name>S&#233;bastien Delcros</name>
    <email>Sebastien.Delcros@gmail.com</email>
  </author>
  <url>http://github.com/digitalfox/pysql/commit/d3fa82c458fe3f9ea767a4fadf314bd0bf492fa6</url>
  <id>d3fa82c458fe3f9ea767a4fadf314bd0bf492fa6</id>
  <committed-date>2009-07-30T11:02:27-07:00</committed-date>
  <authored-date>2009-07-30T04:39:11-07:00</authored-date>
  <message>Add some more statistics on table (nb blocks, avg row length)</message>
  <tree>f8cfbc7c82678635f1e7be46f3443638f264f36b</tree>
  <committer>
    <name>S&#233;bastien Renard</name>
    <email>Sebastien.Renard@digitalfox.org</email>
  </committer>
</commit>
