How to get an execution plan and an execution plan
How to get an execution plan from oracle 1. Get a common execution plan. The effect is similar to executing set autot on exp first and then executing SQL. Explain an plan for your_ SQL; select * from table (dbms_xplan.display); 2. obtain the execution plan with outline information, which is useful when optimizing with sqlprofile, or use this execution plan to learn more about the hint explan plan for your_ SQL in oracle; select * from table (dbm
EBUS_TRANSFER_FIRST* Public Transport retrieval policy constant: minimum transfer* Ebus_assist_first* Public static final int ebus_assist_first* Public Transport retrieval policy constant: Minimum walking distance* EBUS_NO_SUBWAY* Public static final int EBUS_NO_SUBWAY* Public Transport retrieval policy constant: excluding the subway*/// Set a travel route search policy, with time first, minimum transfer, minimum walking distance, or no subwayMKSearch. setTransitPolicy (MKSearch. EBUS_TRANSFER_
" =: B3 7 and "Staff_code" =: B4 8 and "work_staff" =: B5 9 and "O P_date "=: B6 and" op_time "=: B7 and" log_notes "=: B8 and" unit_id "=: B9 and ROWNUM = 1; explained.sql> @getplan ' general,outline,starts ' Enter value for plan Type:outlineplan_table_ OUTPUT----------------------------------------------------------------------------------------------------------------Pla N Hash value:692294925--------------------------------------------------------
Label:Directory Query function and its test Rebuilding the Index Table Management Portal Introduction Remote Access Ensemble =================================================== =================================================== Query function and its test: How Query works: . CLS section: First, set the function name, incoming variable, and outgoing variable list containing three Classmethod:execute, Fetch, Close, based on the query incoming data to create an index table IDXA (need to build in p
Tags: SQL optimization database execution Plan optimizations indexes There was a script that ran for a long time without results, and the results were instantly optimized. The original statement is as follows:sql> explain plan for 2 select * 3 from Crm_dg.tb_ba_channelstaff A, 4 crm_dg.tb_ba_s Ubscription_hist B, 5 crm_dg.tb_cm_serv C 6 where a.subs_id = b.subs_id 7 and B. serv_id = c.serv_id 8 and a.create_date >= to_date (' 20150201 ', ' YYYYMMDD ') 9 and C.ACC_NBR = ' 1532292 6784 '; ex
OR causes Cartesian Product
Recently, I monitored the database and found that the following statement ran very slowly. The original execution plan went through, resulting in Cartesian Product. Let's look at the following statement:
SQL> explain plan for 2 SELECT COUNT (*) 3 FROM "GD_FS ". "TZZ_SJ_DEV_DISC_79073" "A2", 4 "GD_FS ". "TZZ_SJ_DEVELOP_MONTH" "A1" 5 WHERE "A1 ". "SERV_ID" = "A2 ". "SERV_ID" 6 AND "A1 ". "STAT_DATE" = "A2 ". "STAT_DATE" 7 AND "A2 ". "ALLO_DISC_TYPE_3" LIKE '% lease %'
object. VaR Start = result. getstart (); VaR End = result. getend ();Addstart (start. Point, start. Title );Addend (end. Point, end. Title ); // Directly obtain the first solution VaR Plan = result. getplan (0 ); // Traverse all walking routes For ( VaR I = 0; I If (Plan. getroute (I). getdistance ( False )> 0 ){ // It is determined that only a walking line greater than 0 will be drawn. Addmediaroute
mysearchlistener (); // specify the first coordinate // start = new mkplannode (); // start.pt = new geopoint (INT) (39.915*1e6), (INT) (116.404*1e6); // specify the Second coordinate. // end = new mkplannode (); // end.pt = new geopoint (40057031,2017307852); // method for setting the callback route // mksearch. walkingsearch (null, start, null, end );
Then define a mysearchlistener implements mksearchlistener
Implement the ongetwalkingrouteresult method in the interface
@ Overridepublic void
constant: minimum walking distance * ebus_no_subway * Public static final int ebus_no_subway * Public Transit retrieval policy constant: Excluding Metro * // you can specify a travel route search policy, time First, minimum transfer, minimum walking distance, or no subway mksearch. settransitpolicy (mksearch. ebus_transfer_first); mksearch. transitsearch ("Beijing", start, end); // The city name must be set.
Implement ongettransitrouteresult (mktransitrouteresult, INT) of mysearchlistener and
Third, draw the polyline yourselfNext, we draw the search-completed route in the callback function Setsearchcompletecallback.Note Oh, here are two search routes are drawn out Oh ~ ~So simple three words, very simple.First sentence, get arraySecond sentence, creating a polylineThird sentence, add polyline overlay Driving.setsearchcompletecallback (function () { var pts = Driving.getresults (). Getplan (0). Getroute (0). GetPath (); Get a
search
3. Draw a line by yourself
Next, we will plot the search route in the callback function setSearchCompleteCallback.
Note: here we have drawn both search routes ~~
Just three simple sentences.
First, obtain the Array
Second, create a line
Third, add a line covering
Driving. setSearchCompleteCallback (function () {var pts = driving. getResults (). getPlan (0 ). getRoute (0 ). getPath (); // get the array var polyline = new BMap of a series of
(); end.pt = new geopoint (40057031,2017307852); // call the route callback method mksearch. transitsearch ("Beijing", start, end );
The following method is implemented in the interface implemented by mysearchlistener implements mksearchlistener:
@ Overridepublic void ongettransitrouteresult (mktransitrouteresult result, int type) {// callback Method for Public Transit transfer // v7.00 // If (result = NULL) {// return; /// transitoverlay = new transitoverlay (baidu_suyiactivity.this,
There is a limit to the number of navigation points that Baidu officially provides to developers: no more than 10 passes. Suppose I have n points in my hand to draw a trajectory, what to do. However, the route for each point and the next point must be Baidu's recommended route.
1, define the driving object: **onsearchcomplete** function can get every driving.search retrieval after the completion of the callback function, where you can get a collection of points to draw
var driving = new B
Application scenario: Returns a JSON-formatted list data on the server, with JS being used in the front-end page to draw the DOM1, according to the HTML template to replace the data part of the implementation modeHTML templatesTemplates -Divstyle= "Display:none;">ulID= "Itemdatatempletecontent">Lionclick= "Getplan ({itemdata_id});">span>Name: {Itemdata_name}span>Li>ul>Div>JS method//create content from templates, add dom by using string substitution s
= document.getElementById ("Follow");
playbtn = document.getElementById ("Play");
pausebtn = document.getElementById ("pause");
resetbtn = document.getElementById ("reset");
Initialize the map, select the first point as the starting point
map = new Bmap.map ("container");
Map.centerandzoom (Points[0], 15);
Map.enablescrollwheelzoom ();
Map.addcontrol (New Bmap.navigationcontrol ());
Map.addcontrol (New Bmap.scalecontrol ());
Map.addcontrol (New Bmap.overviewmapcontro
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.