Welcome Guest, Not a member yet? Register   Sign In
how to optimise join queries for using with jquery datatable?
#3

(This post was last modified: 03-22-2015, 09:29 PM by musicalangel.)

(03-22-2015, 05:07 PM)shivraj.chari Wrote: hello
i am using jquery datatable for my project ,which is developed in codeigniter.I am using server side processing for datatable using ajax.To display data  it is  doing 4 table join queries.each table has 12k records.but when i run the query it takes lotsa time to display the result and the server eventually timeouts.

I am using Ignited Datatables wrapper for using data table with codeigniter.
any help will be appreciated

thanks in advance.

Greetings,


Try CroNIX suggestion first.

IMO,

if all your table are so much data, try limiting the table data before join. for example


Code:
select t1.field1, t1.field2, table2.field1, table2.field2 from
   (select field1, field2 from table1 where ...) as t1
join table2 on table2.id=t1.field2


...

if fully join 4 table with 12k row each, the total cost will very expensive.
(12K * 12K* 12K* 12K)=12K^4
Reply


Messages In This Thread
RE: how to optimise join queries for using with jquery datatable? - by musicalangel - 03-22-2015, 09:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB