> Not sure what you mean here -- you can do simple queries in the db as well 
> as complex filtering in Python -- they are orthogonal considerations.
>

I CAN, but I SHOULDN'T want to...

RDBMS are built for complex filtering - this is (part) of what SQL is 
allabout - I wouldn't want to dismiss that - it would be a bad choice 
all-around.

Conversely, simple-filtering is way too verbose using the DAL - it's an 
overkill for that, and makes the code much less readable. Again, it's a 
circumstancial-trade-off: For complex filtering, the price of verbosity in 
using the DAL is worth it, because the performance-benefits are just too 
high.
For simple filtering, well, I'd rather do it in python and get readability, 
becuase the performance-benefits are negligible.

 

> Now you've really lost me -- what does any of this have to do with RDBMS 
> vs. NoSQL? And why shouldn't you do complex filtering in Python?
>

See above.
 

>
> Not sure what you mean. The DAL returns a Rows object. You can filter it 
> with any simple or complex comparison you like. It even has a .find() 
> method to simplify the process:
>
> db.Country(france).select().find(lambda r: r.Language != spanish and r.
> Population > 1000000)
>

That's actully pretty nice - I didn't know I can do that - but what would 
the "france" and "spanish" objects be in this case? Ids? 

>
>
> OK, please provide some benchmarks. What percentage decrease in CPU usage 
> can we expect if we compare object identities rather than integer 
> equivalencies?
>  
>

Really? You think I need to?
Identity-checking is a built-in and operates within the VM-level.
Equality-checks, even for the simplest of objects, are much more complex 
internally, and are not exclusively operating on the VM-core level - there 
are object-attributes and value-type-checking involved, etc.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to