SQL data link Ethereum
Publish: 2021-05-20 20:09:29
1. Data link refers to the link of exchanging data, and the data link in the military is a data network, just like the Internet, as long as you have a data terminal, you can get the information you need from the data link, just as you use a computer to access the Internet, you can also use the terminal to add things to the data link network
in a broad sense, the most perfect thing about the military data link is that all units contribute data information. For example, if a UAV finds that there are troops in a certain place, it can first identify whether the area has its own troops through the data link, and then identify whether the troops are enemies or friends, When identified as the enemy, you can publish messages through the data link. In this way, no matter the army tanks or Air Force fighters on the ground, or the rear headquarters will get this information
and this network function can be infinitely refined, such as setting up a special rescue system. If someone is injured on the battlefield, it can immediately release the location, injured part, and information of the wounded, while the special rescue department can only keep detecting whether there is new injury information, as long as there is information of the wounded, According to the reported information of the wounded, prepare the corresponding first aid equipment, and then combine the distribution data of the enemy and ourselves to select a safe channel to rush to the position of the wounded for rapid and effective rescue. Moreover, it can even let the rescue helicopter which has already set out in the air receive the new wounded on the way, which is a great help to improve the rescue efficiency.
in a broad sense, the most perfect thing about the military data link is that all units contribute data information. For example, if a UAV finds that there are troops in a certain place, it can first identify whether the area has its own troops through the data link, and then identify whether the troops are enemies or friends, When identified as the enemy, you can publish messages through the data link. In this way, no matter the army tanks or Air Force fighters on the ground, or the rear headquarters will get this information
and this network function can be infinitely refined, such as setting up a special rescue system. If someone is injured on the battlefield, it can immediately release the location, injured part, and information of the wounded, while the special rescue department can only keep detecting whether there is new injury information, as long as there is information of the wounded, According to the reported information of the wounded, prepare the corresponding first aid equipment, and then combine the distribution data of the enemy and ourselves to select a safe channel to rush to the position of the wounded for rapid and effective rescue. Moreover, it can even let the rescue helicopter which has already set out in the air receive the new wounded on the way, which is a great help to improve the rescue efficiency.
2. bitcoin is a virtual currency, and SQL data link, also known as blockchain, is an algorithm. An algorithm is not equal to a virtual currency. So it won't be the second bitcoin. But SQL data link can be used as an algorithm to generate virtual currency.
3. Data link refers to the link of exchanging data, and the data link in the military is a data network, just like the Internet, as long as you have a data terminal, you can get the information you need from the data link, just as you use a computer to access the Internet, you can also use the terminal to add things to the data link network.
4.
-
login database administrator permissions
the black italics need to be modified according to your own needs, such as the name of the data link, and the account password of the database to be linked
supplement: how to determine the database servicename:
(1) use in PLSQL: select name, value from V $parameter, where name = & 39; service_ names'
(2) using: Show parameter [S] service in sqlplus_ names;
5. In order to understand Oracle architecture, we must first understand two basic concepts: database and instance.
one: database
database is a data set.
whether the database adopts relational structure or object-oriented structure, Oracle database stores its data in data files, The logical
mapping of database structure data to files enables different data to be stored separately, which is called table space.
Introction to table space and files:
1: table space
table space is the logical division of database, and each database has at least one
table space, A table space can only belong to one database.
each table space consists of one or more files on the same disk, These files are called data files.
table space features:
1) control database data disk allocation
2) limit the size of disk space that users can use in the table space
3) table space has online, offline, readonly, Readwrite attribute
modify the attributes of the table space:
sql & gt; Alter tablespace name attribute;
one: database
database is a data set.
whether the database adopts relational structure or object-oriented structure, Oracle database stores its data in data files, The logical
mapping of database structure data to files enables different data to be stored separately, which is called table space.
Introction to table space and files:
1: table space
table space is the logical division of database, and each database has at least one
table space, A table space can only belong to one database.
each table space consists of one or more files on the same disk, These files are called data files.
table space features:
1) control database data disk allocation
2) limit the size of disk space that users can use in the table space
3) table space has online, offline, readonly, Readwrite attribute
modify the attributes of the table space:
sql & gt; Alter tablespace name attribute;
6. It's better not to implement this requirement in database, but in program, because the same data may be changed many times.
it's recommended that you add an original ID and a change ID in the data table. The original id always exists in the data link, and there is an increasing ID after a change.
the program can be written as a public mole, and the field name does not need to be written dead, Take out the fields of the comparison table from the system table
it's recommended that you add an original ID and a change ID in the data table. The original id always exists in the data link, and there is an increasing ID after a change.
the program can be written as a public mole, and the field name does not need to be written dead, Take out the fields of the comparison table from the system table
7. DBMS of Oracle 10g_ Display in xplan package_ The cursor function is different from the display function_ Cursor is used to display the real execution plan of SQL statement. In most cases,
displaying the real execution plan helps to better analyze the whole process of SQL statement, especially the real-time I / O cost of running this SQL statement. By comparing the estimated I / O cost with the real I / O cost, we can judge the problems of
sql statement, such as the lack of statistical information, the number of SQL statement execution, and the appropriate connection method according to the actual size of the intermediate result set. This article only talks about
display_ The use of cursor function
I. display_ Cursor function usage
1_ Cursor function syntax
DBMS_ XPLAN.DISPLAY_ CURSOR(
sql_ id IN VARCHAR2 DEFAULT NULL,
cursor_ child_ no IN NUMBER DEFAULT NULL,
format IN VARCHAR2 DEFAULT ' TYPICAL'); < br />
2、display_ Parameter description of cursor function
sql_ ID
specifies the parent cursor of the SQL statement in the library cache execution plan. The default value is null. When the default value is used, the execution plan of the last SQL statement in the current session will be returned
you can query V $SQL or V $sqlarea's SQL_ ID column to get the SQL of the SQL statement_ ID< br /> cursor_ child_ No
specifies the ordinal of the child cursor of the parent cursor. That is, specify the sub cursor of the SQL statement returned to the execution plan. The default value is 0. If NULL, the SQL_ All the execution plans of
child cursors under the parent cursor indicated by ID will be returned
format
controls the output part of the SQL statement execution plan, that is, which can be displayed and which not. Using the format parameter and modifier of the display function is also applicable here
in addition, when statistics is turned on_ Level = all or use gather_ plan_ Statistics prompt can obtain the real-time statistical information in the execution plan
for detailed format description, please refer to: DBMS_ The description of the format parameter in the use of xplan's display function
the new modifier of format is given below when enabling statistics information
iostats controls the display of I / O statistics
last, by default, displays all the statistics that have been calculated. If this value is specified, only the statistics of the last execution will be displayed
memstats controls the display of PGA related statistics
allstats this is a shortcut to iostats and memstats, that is, allstats contains iostats and memstats
run_ stats_ Last is equivalent to iostats last. It can only be used for Oracle 10g R1
run_ stats_ Tot is equivalent to iostats. It can only be used for Oracle 10g R1
to capture the most IO consuming SQL in the latest hour:
select SQL_ id, COUNT(*)
FROM gv$active_ session_ history ash, gv$event_ name evt
WHERE ash.sample_ time > SYSDATE - 1 / 24
AND ash.session_ state = ' WAITING'< br /> AND ash.event_ id = evt.event_ id
AND evt.wait_ class = ' User I/O'< br /> GROUP BY sql_ id
ORDER BY COUNT(*) DESC;
execute the above SQL:
sql & gt; SELECT sql_ id, COUNT(*)
FROM gv$active_ session_ history ash, gv$event_ name evt
2 3 WHERE ash.sample_ time > SYSDATE - 1 / 24
4 AND ash.session_ state = ' WAITING'< br /> 5 AND ash.event_ id = evt.event_ id
6 AND evt.wait_ class = ' User I/O'< br /> 7 GROUP BY sql_ id
8 ORDER BY COUNT(*) DESC;< br />
SQL_ ID COUNT(*)
------------- ----------
g7fu6qba82m6b 668
63r47zyphdk06 526
9f5m4wd88nc1h 514
593p47drw5fhk 232
br91w16jzy4fu 120
4fvwyjpnh6tp7 78
gm0nrbfuj8kzr 70
2184k363hw4xd 68
gc4dajs7g5myy 46
8vrk9sfuwfdgq 4 2
ccpnb4dwdmq21 40
View SQL execution plan:
select * from table (DBMS)_ xplan.display_ cursor(' g7fu6qba82m6b'));
execute in SQL plus:
sql & gt; set pagesize 2000
SQL> SELECT * FROM TABLE(dbms_ xplan.display_ cursor(' g7fu6qba82m6b'));< br />
PLAN_ TABLE_ OUTPUT
------------------------------------------------------------------------------------------------------------------------
SQL_ ID g7fu6qba82m6b, child number 0
-------------------------------------
UPDATE " CPDDS_ PDATA".& quot; CDM_ LEDGER" SET " CSTM_ NAME" = : a1," CSTM_ NO" =< br />:a2," PAPER_ TYPE" = : a3," PAPER_ NO" = : a4," CURR_ TYPE" = : a5," SVT_ NO" =< br />:a6," BAL_ DIR" = : a7," BAL" = : a8," AVAL_ BAL" = : a9," NORM_ FRATIO" =< br />:a10," PK_ BAL" = : a11," DR_ ACCU" = : a12," CR_ ACCU" = : a13," LAST_ TRAN_ DATE" =< br />:a14," LAST_ TRAN_ TIME" = : a15," PRT_ LINE_ NUM" = : a16," NOREG_ PK_ REC_ NUM" =< br />:a17," PK_ NO" = : a18," PWD" = : a19," FLAG" = : a20," FRZ_ FLAG" =< br />:a21," CARD_ HOLD_ FLAG" = : a22," PK_ HOLD_ FLAG" = : a23," BGN_ INT_ DATE" =< br />:a24," OPEN_ DATE" = : a25," ACC_ HOLD_ FLAG" = : a26," CLS_ DATE" =< br />:a27," OPEN_ TLR" = : a28," CLS_ TLR" = : a29," CLS_ INT" = : a30," OPEN_ INST" =< br />:a31," ADD_ NUM" = : a32," DAC" = : a33," FRZ_ TIMES1" = : a34," FRZ_ TIMES2" =< br />:a35," HOST_ SEQNO" = : a36," D_ UPDATE_ DATE" = : a37 WHERE " ACC" = : b0
Plan hash value: 319441092
-----------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------
| 0 | UPDATE STATEMENT | | | | 3 (100)| |
| 1 | UPDATE | CDM_ LEDGER | | | | |
|* 2 | INDEX UNIQUE SCAN| I_ CDM_ LEDGER | 1 | 269 | 2 (0)| 00:00:01 |
-----------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access(" ACC"=: B0)
29 rows selected_ Cursor displays the real execution plan
2. For the format parameter, the values of the display function and the display function are also applicable to display_ Cursor function
3_ Level is all or use gather_ plan_ Statistics prompts that you can obtain the statistical information at the time of execution
4. According to the real and estimated statistical information, you can preliminarily determine the reasons for the low efficiency of SQL, such as the accuracy of statistical information, the main overhead in which steps, etc
displaying the real execution plan helps to better analyze the whole process of SQL statement, especially the real-time I / O cost of running this SQL statement. By comparing the estimated I / O cost with the real I / O cost, we can judge the problems of
sql statement, such as the lack of statistical information, the number of SQL statement execution, and the appropriate connection method according to the actual size of the intermediate result set. This article only talks about
display_ The use of cursor function
I. display_ Cursor function usage
1_ Cursor function syntax
DBMS_ XPLAN.DISPLAY_ CURSOR(
sql_ id IN VARCHAR2 DEFAULT NULL,
cursor_ child_ no IN NUMBER DEFAULT NULL,
format IN VARCHAR2 DEFAULT ' TYPICAL'); < br />
2、display_ Parameter description of cursor function
sql_ ID
specifies the parent cursor of the SQL statement in the library cache execution plan. The default value is null. When the default value is used, the execution plan of the last SQL statement in the current session will be returned
you can query V $SQL or V $sqlarea's SQL_ ID column to get the SQL of the SQL statement_ ID< br /> cursor_ child_ No
specifies the ordinal of the child cursor of the parent cursor. That is, specify the sub cursor of the SQL statement returned to the execution plan. The default value is 0. If NULL, the SQL_ All the execution plans of
child cursors under the parent cursor indicated by ID will be returned
format
controls the output part of the SQL statement execution plan, that is, which can be displayed and which not. Using the format parameter and modifier of the display function is also applicable here
in addition, when statistics is turned on_ Level = all or use gather_ plan_ Statistics prompt can obtain the real-time statistical information in the execution plan
for detailed format description, please refer to: DBMS_ The description of the format parameter in the use of xplan's display function
the new modifier of format is given below when enabling statistics information
iostats controls the display of I / O statistics
last, by default, displays all the statistics that have been calculated. If this value is specified, only the statistics of the last execution will be displayed
memstats controls the display of PGA related statistics
allstats this is a shortcut to iostats and memstats, that is, allstats contains iostats and memstats
run_ stats_ Last is equivalent to iostats last. It can only be used for Oracle 10g R1
run_ stats_ Tot is equivalent to iostats. It can only be used for Oracle 10g R1
to capture the most IO consuming SQL in the latest hour:
select SQL_ id, COUNT(*)
FROM gv$active_ session_ history ash, gv$event_ name evt
WHERE ash.sample_ time > SYSDATE - 1 / 24
AND ash.session_ state = ' WAITING'< br /> AND ash.event_ id = evt.event_ id
AND evt.wait_ class = ' User I/O'< br /> GROUP BY sql_ id
ORDER BY COUNT(*) DESC;
execute the above SQL:
sql & gt; SELECT sql_ id, COUNT(*)
FROM gv$active_ session_ history ash, gv$event_ name evt
2 3 WHERE ash.sample_ time > SYSDATE - 1 / 24
4 AND ash.session_ state = ' WAITING'< br /> 5 AND ash.event_ id = evt.event_ id
6 AND evt.wait_ class = ' User I/O'< br /> 7 GROUP BY sql_ id
8 ORDER BY COUNT(*) DESC;< br />
SQL_ ID COUNT(*)
------------- ----------
g7fu6qba82m6b 668
63r47zyphdk06 526
9f5m4wd88nc1h 514
593p47drw5fhk 232
br91w16jzy4fu 120
4fvwyjpnh6tp7 78
gm0nrbfuj8kzr 70
2184k363hw4xd 68
gc4dajs7g5myy 46
8vrk9sfuwfdgq 4 2
ccpnb4dwdmq21 40
View SQL execution plan:
select * from table (DBMS)_ xplan.display_ cursor(' g7fu6qba82m6b'));
execute in SQL plus:
sql & gt; set pagesize 2000
SQL> SELECT * FROM TABLE(dbms_ xplan.display_ cursor(' g7fu6qba82m6b'));< br />
PLAN_ TABLE_ OUTPUT
------------------------------------------------------------------------------------------------------------------------
SQL_ ID g7fu6qba82m6b, child number 0
-------------------------------------
UPDATE " CPDDS_ PDATA".& quot; CDM_ LEDGER" SET " CSTM_ NAME" = : a1," CSTM_ NO" =< br />:a2," PAPER_ TYPE" = : a3," PAPER_ NO" = : a4," CURR_ TYPE" = : a5," SVT_ NO" =< br />:a6," BAL_ DIR" = : a7," BAL" = : a8," AVAL_ BAL" = : a9," NORM_ FRATIO" =< br />:a10," PK_ BAL" = : a11," DR_ ACCU" = : a12," CR_ ACCU" = : a13," LAST_ TRAN_ DATE" =< br />:a14," LAST_ TRAN_ TIME" = : a15," PRT_ LINE_ NUM" = : a16," NOREG_ PK_ REC_ NUM" =< br />:a17," PK_ NO" = : a18," PWD" = : a19," FLAG" = : a20," FRZ_ FLAG" =< br />:a21," CARD_ HOLD_ FLAG" = : a22," PK_ HOLD_ FLAG" = : a23," BGN_ INT_ DATE" =< br />:a24," OPEN_ DATE" = : a25," ACC_ HOLD_ FLAG" = : a26," CLS_ DATE" =< br />:a27," OPEN_ TLR" = : a28," CLS_ TLR" = : a29," CLS_ INT" = : a30," OPEN_ INST" =< br />:a31," ADD_ NUM" = : a32," DAC" = : a33," FRZ_ TIMES1" = : a34," FRZ_ TIMES2" =< br />:a35," HOST_ SEQNO" = : a36," D_ UPDATE_ DATE" = : a37 WHERE " ACC" = : b0
Plan hash value: 319441092
-----------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------
| 0 | UPDATE STATEMENT | | | | 3 (100)| |
| 1 | UPDATE | CDM_ LEDGER | | | | |
|* 2 | INDEX UNIQUE SCAN| I_ CDM_ LEDGER | 1 | 269 | 2 (0)| 00:00:01 |
-----------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access(" ACC"=: B0)
29 rows selected_ Cursor displays the real execution plan
2. For the format parameter, the values of the display function and the display function are also applicable to display_ Cursor function
3_ Level is all or use gather_ plan_ Statistics prompts that you can obtain the statistical information at the time of execution
4. According to the real and estimated statistical information, you can preliminarily determine the reasons for the low efficiency of SQL, such as the accuracy of statistical information, the main overhead in which steps, etc
8. Hello
What do you mean by data link
If Oracle
and
Delphi do not work well, that is to say, your chain lacks authentication related information, such as DBA identity, you need to reconfigure the chain again, and pay attention to saving the password, so that ADO can use the data. PL-SQL provides you with default options on the interface
if it helps you, please accept it.
What do you mean by data link
If Oracle
and
Delphi do not work well, that is to say, your chain lacks authentication related information, such as DBA identity, you need to reconfigure the chain again, and pay attention to saving the password, so that ADO can use the data. PL-SQL provides you with default options on the interface
if it helps you, please accept it.
9. Minimize the use of data links. Query statements use less join queries, and OraOLEDB. Oracle]. Yzmc should be a table without this data or dirty data..
10. military? computer? mobile phone? All of them
want to check by yourself<
the database I gave you has three kinds of database chains that can be used to determine the user's reference to all object names:
Special Database chain: it is established for a specified user. The private database chain is only available to the owner of the chain. Used to specify a global object name in SQL statements or in the holder's view procere definition
public database chain: established for special user group public. The common database chain can be used by any user to specify a global object name or object definition in SQL statements
network data link: it is established and managed by the network domain server. It can be used by any user of any database in the network. It can be used in the SQL statement to specify the global object name or object definition. Note: the current network domain server cannot use Oracle, so the network database chain is not available.
want to check by yourself<
the database I gave you has three kinds of database chains that can be used to determine the user's reference to all object names:
Special Database chain: it is established for a specified user. The private database chain is only available to the owner of the chain. Used to specify a global object name in SQL statements or in the holder's view procere definition
public database chain: established for special user group public. The common database chain can be used by any user to specify a global object name or object definition in SQL statements
network data link: it is established and managed by the network domain server. It can be used by any user of any database in the network. It can be used in the SQL statement to specify the global object name or object definition. Note: the current network domain server cannot use Oracle, so the network database chain is not available.
Hot content