On Nov 4, 1:52 pm, "Ian Bambury" <[EMAIL PROTECTED]> wrote:
> But where would I pick up the customer name and product description?
>
> I imagine that
>
> lines = OrderLine.all().filter('quantity >', 1000)
>
> will return me OrderLines so I now have a list of all the order lines in the
> system (or up to 1000 anyway) where the order quantity for that product is
> over 1000 units but I don't have the customer name or the
> product description which will differ for every line

So?  Someone has to get that data.  In SQL, the DB will.  In App
Engine, you have to write the code.

As a programmer, you have two choices, you can either put things
together so they can be accessed at the same time or you can do some
processing to combine multiple pieces of data.  Since the latter is
exactly what SQL joins do....

>  If you
> wanted to find out how many DVDs were never rented from a video rental
> service over the last year, you'd have more than 1000 titles and even if you
> didn't, you'd have to try to match them all up with all the rentals one at a
> time.

Why?  If each dvd has a unique key and a last rental time, it's
trivial to write a query that will find the ones that weren't rented
last year.  You do have to manage the >1000 problem, but that's not
terribly difficult.  And, if this sort of query is common, you can
even precompute some things during the rent-movie operation that will
make it fairly fast.

> In SQL you could do the whole thing, 10,000,000 records in one hit. It might
> take a moment or two, though, but it would do it.

10 million records at 100 bytes/record is 1 billion bytes.  That
doesn't happen in "a moment or two".

And, if you've got lots of users doing operations that hit 1 billion
bytes, you're pretty much hosed unless they're hitting the same bytes
at almost the same time (or you're hitting a giant server farm).

SQL is not a magic bullet.  At some level, it "just" writes joins for
you.  Queries that look at at lots of records (or bytes) are going to
be slow no matter who writes the joins.

App Engine does penalize slow queries, but that's a good thing for
user-facing code.

What App Engine does need is a way to perform off-line processing.
--~--~---------~--~----~------------~-------~--~----~
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