def METHOD_NAME(conn):
    tbl = self.master.db.model.logchunks
    q = sa.select([sa.func.sum(sa.func.length(tbl.c.content))])
    q = q.where(tbl.c.logid == logid)
    return conn.execute(q).fetchone()[0]