AW: counting rows

From: Peter Schröder (Peter.Schroede..reenet-ag.de)
Date: Mon Jul 23 2007 - 06:59:02 EDT

  • Next message: Andrus Adamchik: "Re: Autogenerated column by DB"

    hi jack,

    search the list on count query.

    -----Ursprüngliche Nachricht-----
    Von: Jack O'Connor [mailto:jo418..ristol.ac.uk]
    Gesendet: Montag, 23. Juli 2007 12:50
    An: use..ayenne.apache.org
    Betreff: counting rows

    A question about efficiency: Counting the number of rows in a table.

    Currently, I run a select query, then iterate through the rows,
    incrementing a counter. This takes too long. Is there a way to use the
    SQL command:
    SELECT count(*) FROM <table>

    Or something similar, that quickly returns the number of rows from a
    select query?

    Thanks
    Jack



    This archive was generated by hypermail 2.0.0 : Mon Jul 23 2007 - 06:58:58 EDT