django-query-profiler
Norm
django-query-profiler | Norm | |
---|---|---|
3 | 3 | |
129 | 22 | |
- | - | |
0.0 | 0.0 | |
over 1 year ago | 10 months ago | |
Python | Python | |
BSD 3-clause "New" or "Revised" License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
django-query-profiler
-
Show HN: Sqlbind a Python library to compose raw SQL
But that's still not backend-specific SQL?
There should be an interface method for this. Why does psycopg call it mogrify?
https://django-debug-toolbar.readthedocs.io/en/latest/panels... :
> debug_toolbar.panels.sql.SQLPanel: SQL queries including time to execute and links to EXPLAIN each query
But debug toolbars mostly don't work with APIs.
https://github.com/django-query-profiler/django-query-profil... :
> Django query profiler - one profiler to rule them all. Shows queries, detects N+1 and gives recommendations on how to resolve them
https://github.com/jazzband/django-silk :
> Silk is a live profiling and inspection tool for the Django framework. Silk intercepts and stores HTTP requests and database queries before presenting them in a user interface for further inspection
-
My £4 a month server can handle 4.2M requests a day
I agree that this stuff can definitely be handled better.
https://github.com/django-query-profiler/django-query-profil... has a neat option for detecting likely N+1 queries. I usually use the Django Debug Toolbar for this.
Django's ".only()" method lets you specify just the columns you want to retrieve - with the downside that any additional property access can trigger another SQL query. I thought I'd seen code somewhere that can turn those into errors but I'm failing to dig it up again now.
I've used the assertNumQueries() assertion in tests to guard against future changes that accidentally increase the number of queries being made without me intending that.
The points you raise are valid, but there are various levels of mitigations for them. Always room for improvement though!
-
Optimizing Django ORM SQL Queries
If you are trying to optimize for N+1 queries, django query profiler is another cool profiler. It is very simple to configure (requires changing 3-4 lines in your settings.py file), and works the same way with a chrome plugin and the command line.
Norm
- Show HN: Sqlbind a Python library to compose raw SQL
-
Sketch of a Post-ORM
This is just not liking SQL, which is fine, but it's not 'the future of querying databases'. It's just a simplified language that is under-specified and doesn't really support even a fraction of the use cases of SQL, and therefore looks 'cleaner'. It's a bad abstraction.
Here is my attempt at a 'post orm' if anyone is interested, as a bonus it is fully implemented and some people actually use it: https://github.com/justinvanwinkle/Norm
-
Show HN: Write universally accessible SQL, not library-specific ORM wrapper APIs
I tried to do something similar with https://github.com/justinvanwinkle/Norm about 10 years ago. It hasn't generated a lot of interest, but I find it quite useful to construct queries without having to learn the minutia of an ORM library, or even a SQL generation library.
What are some alternatives?
azure-docs - Open source documentation of Microsoft Azure
pure-orm - A pure ORM for writing native SQL queries yielding pure business objects
Django-CRM - Open Source CRM based on Django
pgdbf - Convert XBase / FoxPro databases to PostgreSQL
cryptogalaxy - Get any cryptocurrencies ticker and trade data in real time from multiple exchanges and then save it in multiple storage systems.
rusqlite-model - Model trait and derive implementation for rusqlite
django-query-profil
mammoth - A type-safe Postgres query builder for TypeScript.
appmap-intellij-plugin
Hangfire - An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
Protobuf - Protocol Buffers - Google's data interchange format
slonik - A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.