Hi Bruce,
  You should maintain statistics on that data yourself.  You could do
this at write-time, by using tasks to update the stats for instance.
Or, you could periodically use a map-reduce to recompute the
statistics.

  The best approach depends largely on your needs and how the data
arrives to your app.  In many of my apps I need more realtime stats,
so I often prefer to look for ways to batch my writes and update my
stats "views" in near realtime.  I also often prefer this approach for
data that steams in, but doesn't get updated a lot.

  Map reduce might be a good choice if you only need stats updated
periodically. If most of the data is static and you have a lot of
data, I personally find running map-reduces over the whole dataset
very wasteful.  In those cases I've written a custom map-reduce
utility that support filtered queries.  Then I'll do something like
stick a 'batch number' on my entities at write time;  I increment the
batch number each time I fire off a map-reduce job so that changes
will get picked up next time and not interfere with my current job.

  Those are some of the methods I've used with pretty good success.
Other people probably have some more clever tricks too; hopefully they
will share.  :)


Robert



On Wed, Jun 22, 2011 at 04:36, Bruce Aloe <[email protected]> wrote:
> Hello,
>
> Suppose i have a kind named Employee with millions of tuples stored in
> GAE. The Employee kind has properties/attributes like EmployeeId,
> EmployeeName, Salary, StartDate, DepartmentId.
>
> I would like to know the selectivity of each properties/attributes. In
> order to do that, i want an very efficient way to know for example the
> lowest, highest salary in Employee kind, number of different
> EmployeeName in Employee kind.
>
> Do you have any suggestion?
>
> Thanks!
>
> Bruce
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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

Reply via email to