1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do i imporve my mysql query

Discussion in 'Databases' started by neilfurry, Aug 7, 2022.

  1. #1
    Hi,

    Im using symfony doctrine with my database.
    SEMrush
    my problem is when i look into the profiler, i see that my problem is within the query that needs to retrieve thousands of rows and pass it through datatable.

    How can i improve my query to load the page fast?
     

    Attached Files:

    neilfurry, Aug 7, 2022 IP
    SEMrush
  2. sarahk

    sarahk iTamer Staff

    Messages:
    27,998
    Likes Received:
    4,345
    Best Answers:
    123
    Trophy Points:
    665
    #2
    upload_2022-8-8_13-35-45.png n

    t0.docs_id_id is a foreign or parent key, right?

    Think about what you really want returned - there will be another filter or even just pagination through LIMIT.

    Make sure you have t0.docs_id_id indexed, that will help with speed.

    Is the datatable the jsquery datatable? If so, this needs to be an ajax query, they're super simple once you know what you're doing. I can give you some examples. And datatables definitely use paging.
     
    sarahk, Aug 7, 2022 IP