On Sat, Mar 19, 2011 at 12:10 PM, Barry Hunter <barrybhun...@gmail.com>wrote:

> On 19 March 2011 00:22, Nick Johnson (Google) wrote:
>
> > On Fri, Mar 18, 2011 at 7:03 AM, Joshua Smith wrote:
>
> >>
> >> "Generate the next sequential ID" is a function universally provided by
> >> SQL databases.  Also, SQL databases always provide an efficient
> count(rows)
> >> function, whereas GAE does not.  So I don't think it's unreasonable to
> >> expect google to back-fill this deficiency as David asks.
> >
> > Actually, I'm not aware of any relational databases that provide an
> > efficient count() implementation other than on complete tables (which is
> > rarely very useful) - counting the results in an arbitrary result set
> > requires iterating over all the rows, which is what App Engine does.
>
> At least some can answer count queries using just index scans - ie
> doesnt touch the actual data. Can get close to that with keys_only -
> which persumably is just what the index contains - and counting the
> rows, but it still requires transfer of all keys to the application (I
> think anyway) just to be discarded.
>

This is exactly what the .count() method does in App Engine. It's still
O(n), though.

-Nick Johnson


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


-- 
Nick Johnson, Developer Programs Engineer, App Engine

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

Reply via email to