query and save / select * vs filter

its ok to use select * query when using django ? if not what is the downside? what is the difference? thank you and God Bless…

Yes, it is ok to use raw SQL query if you prefer to, either you can use ModelName.objects.all() which actually a select * query.

For this part of your questions, you have to specify the context clearly like difference between what? what kind of downside you are asking in compared too?

I’d actually argue that using raw sql in django is not something which is up to preference. Its more of a last resort if you have something incredibly specific with some database type which cannot be done using django’s orm.

Django has a phenomenal orm, learn to use it, you wont ever look back.

But to get back on topic:
Using a queryset which practially does a select * - or any select which may return a lot of rows is fine. You can solve potential scaling issues by paginating your return set.

Docs for pagination: Pagination | Django documentation | Django