How your model relation look like? Maybe you face the N+1 problem, Do you
check how many queries are performed during your website load? I agree with
above:
- prefetch_related
- select_related
-cached_property
You can read this article, maybe it can help.
https://scoutapm.com/blog/django-and-t
use indexes..
On Wednesday, February 10, 2021 at 7:25:45 PM UTC+5:30 en2lin...@gmail.com
wrote:
>
> I am developing a django application, most of the views are tables, I am
> facing a problem the loading time of my page is extremely long. how can I
> do to optimize this, my data set repres
Also using caching will make a huge difference.
Imagine that you stored all table rows in cache , you only need to rebuild
this cache tree every time you update a row or delete or add new row , you
update the cache tree.
But a simple retrieve will come from cache not database , this will make a
h
Hi, read about this topics
https://docs.djangoproject.com/en/3.1/ref/models/querysets/#select-related
#for FK relations
https://docs.djangoproject.com/en/3.1/ref/models/querysets/#prefetch-related-objects
# for M2M relations
and read about pagination
https://docs.djangoproject.com/en/3.1/topics/p
Use pagination and select_related , prefetch_related.
Also consider using caching
Default django pagination will load all rows then paginate them , which
will consume time and hits on database.
Search for a custom pagination solution that loads 10 rows by 10 rows as an
example
On Wed, 10 Feb 2
I am developing a django application, most of the views are tables, I am
facing a problem the loading time of my page is extremely long. how can I
do to optimize this, my data set represents more than 100,000 rows. thank
you for your help ^^
--
You received this message because you are subsc
6 matches
Mail list logo