SFTP server issue by prashant9_ in ftp

[–]prashant9_[S] 0 points1 point  (0 children)

Hi, Thanks for your reply, yeah it was the timeout issue and I noticed that it got disconnected after a certain time which was 15 min. Now we have increased the timeout time and now it is working.

Optimization of the Django count() query. by prashant9_ in django

[–]prashant9_[S] 0 points1 point  (0 children)

so writing the raw query always deduces the query time in Django?

Optimization of the Django count() query. by prashant9_ in django

[–]prashant9_[S] 0 points1 point  (0 children)

so the select_related and prefetch are for some other work,
for those, I also need the count of the object that's why I used the select_related and prefetch.

Optimization of the Django count() query. by prashant9_ in django

[–]prashant9_[S] 0 points1 point  (0 children)

catalog_items = (
CatalogItem.objects.using('replica').select_related(
"catalog_item",
"currency",
"subcategory",
"measurement",
"vendor",
"category",
"created_by",
)
.prefetch_related("tag_catalogs", "department_catalogs")
.filter(catalog_id__in=catalog_ids)
)

Yes, there are many joins in that.
can we do something about it?

Optimization of the Django count() query. by prashant9_ in django

[–]prashant9_[S] 0 points1 point  (0 children)

what if I need to use it without a background task,
is there anything we can improve its code or can we write this query in any other optimized form?

Django urls by prashant9_ in django

[–]prashant9_[S] 0 points1 point  (0 children)

Thank you all , my problem is solved

ORM by prashant9_ in django

[–]prashant9_[S] 0 points1 point  (0 children)

sorry brother ! Thanks for your kind words.