Home > database > Great god please into how to improve the query speed to shorten the response time
Great god please into how to improve the query speed to shorten the response time
Time:10-05
C_plan there are about 400000 records in the following the beginning of this statement is based on the input end query plan departure flights per month (STD) But don't know why there are three or four minutes long response time couldn't accept beg god to help improve the query speed I don't appreciate also very welcome for other statements
select to_char (TRUNC (add_months (to_date (' 2015-08-01 00:00:00 ', '- DD YYYY - MM HH24: MI: SS'), (1) b.n o), 'MM'), 'YYYY - MM) name, (select count (distinct planid) from c_plan a where clause (adep='ZBAA') and STD BETWEEN TRUNC (add_months (to_date (' 2015-08-01 00:00:00 ', '- DD YYYY - MM HH24: MI: SS'), (1) b.n o), 'MM) And TRUNC (add_months (to_date (' 2015-08-01 00:00:00 ', '- DD YYYY - MM HH24: MI: SS'), b.n o), 'MM) - 1/86400) as the value The from (select level no from dual connect by level & lt;= (select ceil (MONTHS_BETWEEN (to_date (' 23:59:59 2016-10-01 ', '- DD YYYY - MM HH24: MI: SS'), to_date (' 2015-08-01 00:00:00 ', '- DD YYYY - MM HH24: MI: SS'))) from dual)) b
CodePudding user response:
What kind of table structure, the building also said;