diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2007-10-09 05:58:34 +0000 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2007-10-09 05:58:34 +0000 |
| commit | f624bb30313cf84508fcf13097f90f28fe2ed241 (patch) | |
| tree | d2a535d157da9f071e565fff5fde2c319762dee0 /bin/sql_db.py | |
| parent | 541443b30c1829c4efa2d32be3e4611be04351c9 (diff) | |
Project Bugfix
bzr revid: fp@tinyerp.com-7323dac277d16d46794d20fd624d1cd8ea11e828
Diffstat (limited to 'bin/sql_db.py')
| -rw-r--r-- | bin/sql_db.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/sql_db.py b/bin/sql_db.py index 64f6337b57d..21f66a28d2d 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -57,7 +57,7 @@ class fake_cursor: self.con = con self.dbname = dbname - def execute_not_run(self,*args): + def execute(self,*args): #if not fake_cursor.nbr % 1: # print 'sql: ',fake_cursor.nbr, args res = re.match('^select.* from ([a-zA-Z_]+) .*$', args[0], re.I) @@ -71,15 +71,15 @@ class fake_cursor: # else: # print 'sql: ',fake_cursor.nbr, args[0] - #if not fake_cursor.nbr % 5000: - # ct = [] - # for t,c in fake_cursor._tables.items(): - # ct.append([c,t]) - # ct.sort() - # ct.reverse() - # print 'After %d queries' % (fake_cursor.nbr,) - # for line in ct[:50]: - # print ' %s: %d' % (line[1], line[0]) + if not fake_cursor.nbr % 500: + ct = [] + for t,c in fake_cursor._tables.items(): + ct.append([c,t]) + ct.sort() + ct.reverse() + print 'After %d queries' % (fake_cursor.nbr,) + for line in ct[:50]: + print ' %s: %d' % (line[1], line[0]) #if len(args)>1: # print 'sql: ',fake_cursor.nbr, args[0], args[1] |
