Cdbcommand Failed To Execute The Sql Statement

In my query 5 tables joined using join query and 1 sub query.

The sub query was jalso having 3 join.

While executing the query, am getting [color="#FFA500"]"Query execution was interrupt"[/color] error

Query timeout. Check the execution plan

Let me know, how can i check my execution plan?

https://dev.mysql.com/doc/refman/5.0/en/execution-plan-information.html

Thanks, this link helps for simplified query writing.

Here my query, Let me know what problem is there

This query was running good for minimum number of rows, But not for above 20 thousand records(Cdbcommand Failed To Execute The Sql Statement).

Let me know if any other details you want(like table structure, etc.,)

[color="#8B0000"]Query:[/color]

[color="#000080"]Select

   tbl_state.id, tbl_state.name, count(A.res_csc_id) as response_count

From tbl_state

   Left Join


             tbl_zone


        On


             tbl_zone.tbl_state_id = tbl_state.id 





   Left JOIN


             tbl_district


        ON


             tbl_district.tbl_zone_id = tbl_zone.id





   Left JOIN


             tbl_block


        ON


             tbl_block.tbl_district_id = tbl_district.id





   Left Join 


            ( 


              Select


                     res_csc_id,tbl_csc.tbl_block_id


              From 


                     tbl_service_onboarding_response





	         Join


                          tbl_service_onboarding


                     On


                          msg_id = res_msg_id And msg_service_id = 27


		 Join


                          tbl_csc


                     On


                          tbl_csc.CSC_ID = res_csc_id 


	  ) 


              as A on A.tbl_block_id = tbl_block.id

Where tbl_state.id > 0 group by tbl_state.id [/color]