While that works, it will create a Cursor with 'N' rows and then
counts the number of rows. If you instead retrieved "count(*)" as a
column, you'd have a Cursor with 1 row, with a field that contains the
count. The latter is more efficient.


On Wed, Apr 1, 2009 at 5:03 PM, Glen Humphrey
<glendon.humphr...@gmail.com> wrote:
>
> I've used this and it works for me.
>
> c.getCount();
>
> On Apr 1, 12:34 pm, "nEx.Software" <justin.shapc...@gmail.com> wrote:
>> I have found that, if you will be doing a lot of data access, compiled
>> statements will cut the time to complete most operations in half. This
>> is particularly true of inserts. Used in conjunction with
>> beginTransaction()/endTransaction(), using compiled statements can
>> make your data access quite swift. In addition to being faster, I find
>> it easier to construct compiled statements as I can just use plain SQL
>> syntax. Of course, getting familiar with the functions themselves is
>> an important first step.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to