Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Slow invoice printing
(1 viewing) (1) Guest
Support forum for customers who have purchased this product. Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: Slow invoice printing

Slow invoice printing 10 years, 10 months ago #39551

Hi
We're experiencing slowness in invoice printing.
First we create invoice number, then we click on the PDF icon to see the document and it takes up to 40 seconds on a live busy site.
We checked out and MySQL was being very high on that time. Checking mysql-slow.log we found this query taking most of the waiting time:
SELECT i.*,
v.vendor_name AS company_name,
i.title AS title,
i.first_name AS first_name ,
i.middle_name AS middle_name,
i.last_name AS last_name,
i.phone_1 AS phone_1,
i.phone_2 AS phone_2,
vlang.vendor_phone AS phone_vendor,
i.fax AS fax,
u.email AS email,
i.address_1 AS address_1,
i.address_2 AS address_2,
i.city AS city,
s.state_name,
s.state_2_code,
s.state_3_code,
c.country_name,
c.country_2_code,
c.country_3_code,
i.zip AS zip,
vlang.vendor_store_name AS store_name,
vlang.vendor_store_desc AS store_desc,
vlang.vendor_url AS url,
IF (curr.currency_name IS NULL, CONCAT('Currency ',v.vendor_currency), curr.currency_name) AS currency_name,
IF (curr.currency_code_3 IS NULL, CONCAT('Currency ',v.vendor_currency), curr.currency_code_3) AS currency_3_code
FROM `j25_virtuemart_vendors` AS v
LEFT JOIN `j25_virtuemart_vmusers` AS vmusers ON v.virtuemart_vendor_id = vmusers.virtuemart_vendor_id
LEFT JOIN `j25_virtuemart_userinfos` AS i ON (vmusers.virtuemart_user_id=i.virtuemart_user_id AND i.address_type='BT')
LEFT JOIN `j25_virtuemart_countries` AS c ON (i.virtuemart_country_id = c.virtuemart_country_id)
LEFT JOIN `j25_virtuemart_states` AS s ON (i.virtuemart_state_id = s.virtuemart_state_id)
LEFT JOIN j25_virtuemart_vendors_it_it AS vlang ON vmusers.virtuemart_vendor_id = .vlang.virtuemart_vendor_id
LEFT JOIN `j25_users` AS u ON vmusers.virtuemart_user_id = u.id
LEFT JOIN `j25_virtuemart_currencies` AS curr ON v.vendor_currency = curr.virtuemart_currency_id
WHERE v.virtuemart_vendor_id=1 GROUP BY v.virtuemart_vendor_id LIMIT 1;
 



Is there any way to speed it up?
We're using VMInvoice 2.0.24.

Thanks
The topic has been locked.

Re: Slow invoice printing 10 years, 10 months ago #39572

removing the GROUP BY sensibly increases the speed of the operation. I'd advice to remove it
The topic has been locked.

Re: Slow invoice printing 10 years, 10 months ago #39700

  • maju
  • OFFLINE
  • Posts: 1107
Hello,

I am sorry for later response. I will add this idea to our project management for discussion. Thank you also for reporting this issue.
ARTIO Support Team
The topic has been locked.
  • Page:
  • 1
User Login Empty