Skip to content
Advertisement

Slow SQL Query / Displaying (PHP / jQuery)

I have a request to get data in my mySQL database (36,848 entries). Then I format and append them with jQuery on my web page.

These two operations take 2 minutes and 30 seconds. During this time, no other operation is possible on the page.

Is there a way to optimize this to speed up the process? Like this, it’s unusable.

My PHP function

Data retrieval in jQuery (Ajax)

Do you know what I can do to speed up processing time? I’ve tried limiting the SELECT query to only the fields I need but that doesn’t improve processing time.

I wonder if it’s not rather the jQuery layout that takes time rather than the SQL query.

Thank you !

Advertisement

Answer

I just passed from 2 minutes and 30 secondes to 14 secondes with this optimization.

I’m impressed

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement