Performance queries helps

2020-07-10 Thread carlos
Hi, i need any advice for performance queries i have a model name Post post have m2m categories and fk author the index page show 7 categories in separated row i try performance this example queryset_global = Post.objects.filter(status__contains='publish').prefetch_related('category').select_relat

Re: Performance queries helps

2020-07-10 Thread Budi Hermansyah
di you ever try an elastic search for indexing our categories product to speed up? On Sat, Jul 11, 2020 at 12:16 PM carlos wrote: > Hi, i need any advice for performance queries > i have a model name Post > post have m2m categories and fk author > > the index page show 7 categories in separated

Re: Performance queries helps

2020-07-11 Thread damanjeet kaur
{% for news7 in newscat7 %} {{news7.name }} {{news7.date|date:'Y-m-d'}} {{news7.body|safe|truncatewords:20}} {{news7.category.all.0}} Read More {% endfor %} On Sat, Jul 11, 2020 at 10:46 AM carlos wrote: > Hi, i need any advice for performance queries > i

Re: Performance queries helps

2020-07-15 Thread carlos
Budi Hermansyah no, but I think i can improve the queries but I don't know how: / the debug toolbar show many many queries to the database * (44 queries including 34 duplicates ) i don't know duplicates* On Sat, Jul 11, 2020 at 10:58 AM damanjeet kaur wrote: > {% for news7 in newscat7 %} >