Timothy Smith wrote: > i'm using pypgsql
Assuming you work with PostgreSQL, then: You know the EXPLAIN command? EXPLAIN will give you a very accurate estimation for the expense for the query. (You'll have to find out what cost means in terms of your progress.) I did never try this using pypgsql, but if it works, this might be your solution... The precision of EXPLAIN, however, depends on the modifications since the last time you ran VACUUM on the DB. If the size of tables or indices didn't suffer considerable changes since then, the estimation should be quite accurate. Bernhard -- http://mail.python.org/mailman/listinfo/python-list