Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    red flag Which Module or Build In function using this SQL? It slow me down!!!

    Hi all,

    I ask the hosting send me the slow mysql queries log, find it used over 267 second to finished
    Who know where it from?

    # Query_time: 267 Lock_time: 0 Rows_sent: 20 Rows_examined: 205113
    select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, crt.redeem_date, c.coupon_id
    from coupons c
    left join coupon_redeem_track crt
    on c.coupon_id= crt.coupon_id, coupon_email_track et
    where c.coupon_id = et.coupon_id
    and c.coupon_type = 'G'
    order by date_sent desc limit 0, 20;



    Here are my installed Module List

    How Did You Hear About Us
    Confirm Email Address Entry
    Airparcel Shipping
    MultiGeoZone MultiTable Shipping
    Super Orders
    Edit Orders
    Cross Sell
    Cross Sell Advanced
    Image Handler
    Ceon Back In Stock Notifications
    Sales Report
    Print Invoice Popup
    Update Products Quantity in Category Listing
    Easy Populate
    WorldPay
    Stock Quantity Report
    News and Article Manager & Optional Sideboxes
    Report Cheaper Price
    Recently Viewed Items
    Blank Sidebox Mod
    Shipping Estimator Sidebox
    Google Language Selection
    Google reCAPTCHA
    Admin login as customer
    Export Shipping Information

    Thank you all guys who can help on this.

  2. #2
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: Which Module or Build In function using this SQL? It slow me down!!!

    And I am using phpmyadmin see the MySQL

    table coupons, row total right now 173,096
    table coupon_email_track, row total right now 203,539
    table coupon_redeem_track, row total right now 13,574

    Do it safe to del some records in it?

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Which Module or Build In function using this SQL? It slow me down!!!

    In phpMyAdmin, can you do an optimize on each of those 3 tables one by one?

    Does this make any change on the slow query time?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Which Module or Build In function using this SQL? It slow me down!!!

    To find out what file is generating the query, and thus what feature it comes from, search in admin > Tools > Deelopers Toolkit for a distinctive bit of the SQL, like
    left join coupon_redeem_track crt

    Paste this in the lower left box, select all files and search. This will show the file and line number where the query is built.

  5. #5
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: Which Module or Build In function using this SQL? It slow me down!!!

    Quote Originally Posted by Ajeh View Post
    In phpMyAdmin, can you do an optimize on each of those 3 tables one by one?

    Does this make any change on the slow query time?
    Yes, in phpmyadmin, it already optimize and no overhead on it right side.

    Just it records very big, over 300000 totoal.

    On a RAID 1/5 SATA 7200 250/320G HDD ...

  6. #6
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: Which Module or Build In function using this SQL? It slow me down!!!

    Quote Originally Posted by gjh42 View Post
    To find out what file is generating the query, and thus what feature it comes from, search in admin > Tools > Deelopers Toolkit for a distinctive bit of the SQL, like
    left join coupon_redeem_track crt

    Paste this in the lower left box, select all files and search. This will show the file and line number where the query is built.
    gjh42,

    Thank you very much of this hints, I will try this see I am luck or not.

  7. #7
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: Which Module or Build In function using this SQL? It slow me down!!!

    Hi All,

    Using developer tool enter "left join coupon_redeem_track crt"

    Nothing find.

    But I find this

    admin/gv_sent.php

    Line #80 : $gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, crt.redeem_date, c.coupon_id


    Any other idea on this?
    Last edited by explorer1979; 10 Mar 2014 at 05:39 AM.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Which Module or Build In function using this SQL? It slow me down!!!

    What does the rest of that file look like? If the text you first searched for is built from pieces by the file, the search will not find it as such. Does the file have any notes or comments that indicate it was modified from stock? Is its date in your file manager different from other files?

 

 

Similar Threads

  1. v154 using the payment module function get_error
    By torvista in forum Addon Payment Modules
    Replies: 5
    Last Post: 7 Nov 2024, 09:46 PM
  2. Replies: 3
    Last Post: 23 Feb 2010, 10:27 PM
  3. New Build - Pretty Slow
    By Renz in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 10 Jun 2009, 04:02 PM
  4. SQL error when using Protx module and zones
    By ECM in forum Addon Payment Modules
    Replies: 5
    Last Post: 30 Mar 2008, 10:08 AM
  5. which is the best payment module for US payments using v 1.3 ?
    By metamp in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 18 Apr 2007, 09:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg