|
|
Subscribe / Log in / New account

Python multi-level break and continue

Python multi-level break and continue

Posted Sep 1, 2022 20:44 UTC (Thu) by bartoc (guest, #124262)
Parent article: Python multi-level break and continue

The complaint about "trying to do ad-hoc relational querying with imperative code" is particularly frustrating because that's a great example of an algorithm that this stuff makes easier! There's nothing wrong with writing out your "relational queries" instead of going through the whole query planner/optimizer/code generator of a database.


to post comments

Python multi-level break and continue

Posted Sep 1, 2022 21:41 UTC (Thu) by Wol (subscriber, #4433) [Link]

> the whole query planner/optimizer/code generator of a database.

of a *RELATIONAL* database.

Pick does not have a query planner - the optimal plan is "do as you're told".

Pick does not have an optimiser - okay, it's down to the user to make sure all your indices are properly declared, but in a well-designed database there is nothing to optimise.

Pick does have a compiler, but the object code lives in the database and is compiled at development time, not run time.

And the same is true for most other non-relational databases I would think. Hierarchical databases are mostly drill-down and optimised for fast access along common paths. Pick takes that to the next level - it's drill-down and optimised for fast access along any *sensible* path.

Cheers,
Wol

Python multi-level break and continue

Posted Sep 2, 2022 7:23 UTC (Fri) by NYKevin (subscriber, #129325) [Link]

I would not recommend doing relational querying by hand in Python, for three main reasons:

1. Python is slow.
2. Relational querying by hand implies relational querying in a language other than SQL, which is going to be harder to maintain since SQL is the standard language in this space.
3. Python comes with a bundled copy of SQLite, which has neither of the above problems and is ridiculously easy to set up and use.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds