Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ Simple comparison of MySQL and Oracle in a sql analytical details     - rsync + inotify to achieve real-time synchronization (Server)

- Profile Linux users login shell and login to read (Linux)

- Bash environment is automatically install and initialize oh-my-zsh & autojump zsh (Linux)

- Manage SQL Server services login (start) account and password (Database)

- Wireshark basic introduction and learning TCP three-way handshake (Linux)

- KVM usb passthrough configuration (Linux)

- C ++ How to determine the types of constants (Programming)

- Hibernate learning introductory tutorial (Programming)

- CentOS replaces update source and Linux kernel compilation summary (Linux)

- Linux dd command applies amplification SWAP partition (Linux)

- Python substring format (Programming)

- Android Service service applications and the phone SMS Listener Listener (Programming)

- Android annotation support (Support Annotations) (Programming)

- Bash variable expansion modifier (Programming)

- Forbid screen change the window size when creating a new window under CentOS (Linux)

- Ubuntu to install systems Indicator Sticky Notes 0.4.4 (Linux)

- Ubuntu install VMware Workstation 11 tutorials at 14.04 / 14.10 (Linux)

- Ubuntu install Liferea news subscription software (Linux)

- NAT and firewall under Linux (Linux)

- Tmux create the perfect terminal management tool under CentOS (Linux)

  Simple comparison of MySQL and Oracle in a sql analytical details
  Add Date : 2018-11-21      
  SQL syntax parser is a very powerful built-in toolset, which will involve a lot of compilation principles related knowledge, grammar analysis, lexical analysis. . A lot of seemingly theoretical stuff, but it looks boring, their value is more obvious.
 If you look at the history, you will find a lot of people are known as the master of the field of programming are the master of writing the first microcomputer to run the Basic language of Bill Gates, the design Delphi's Borland's "the world's most powerful programmer," Sun's father of JAVA, Bell Labs C + + father
 The starting point to mention some high, and today to share with you is a very simple sql statement in MySQL to resolve the problem, but in Oracle can be successfully resolved through this one can also see some of the details of Oracle and MySQL In some of the differences.
 Need to run the statement is as follows:
 FROM performance_schema.events_waits_summary_by_thread_by_event_name
 INNER JOIN performance_schema.threads USING (THREAD_ID)
 WHERE threads.NAME LIKE 'thread / sql / slave \ -%'
ERROR 1630 (42000): FUNCTION performance.sum does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
At first glance this error, the feeling must be where a problem, they find a clear statement for a while did not find the problem, but from the error point of view seems to occur in the words near the sum.
 Simply put the first line in the
SUM (COUNT_STAR) AS Totalcount to SUM (COUNT_STAR) AS Totalcount problem solved on the cutting edge. Can be seen that the problem is a very small problem, strictly speaking, the statement is not written rigorously. But in my impression Oracle seems to be on this bell situation is Shoudaoqinlai, the impression has not been such a problem.
 Let's take a quick look at this issue in MySQL and Oracle to see what happens.
Create table parse_test (id int, name varchar (30));
 Insert into parse_test values (1, 'aa');
 Insert into parse_test values (2, 'bb');

 Mysql> select count (id) from parse_test;
 + ----------- +
 | Count (id) |
 + ----------- +
 | 2 |
 + ----------- +
 1 row in set (0.00 sec)

 Mysql> select count (id) from parse_test;
ERROR 1630 (42000): FUNCTION test.count does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual

In Oracle, there is no problem.
Create table parse_test (id number, name varchar2 (30));
 Insert into parse_test values (1, 'aa');
 Insert into parse_test values (2, 'bb');
 Select count (id) from parse_test;
 Select count (id) from parse_test;

Oracle analytic complex sql statement aside the advantages of Oracle can be seen in this detail does support the intensity to be higher.
 But the beginning of the MySQL error in the statement into the Oracle inside (if the table structure data are assumed to exist), it must not run. The reason is that the definition of the maximum length of Oracle is 30, but in MySQL to support a lot more, up to 64 bits.

Mysql> create table events_waits_summary_by_thread_by_event_name567890123456789012345 (id int, name varchar (30));
ERROR 1059 (42000): Identifier name 'events_waits_summary_by_thread_by_event_name567890123456789012345' is too long
 Mysql> select length ( 'events_waits_summary_by_thread_by_event_name567890123456789012345');
 + ------------------------------------------------- ---------------------------- +
 | Length ( 'events_waits_summary_by_thread_by_event_name567890123456789012345') |
 + ------------------------------------------------- ---------------------------- +
 | 65 |
 + ------------------------------------------------- ---------------------------- +
 1 row in set (0.01 sec)

Of course, I am also so far I am also picking up a small stone, get some water for the sql parser more in-depth questions, if careful study, from the MySQL code level to analyze the problem to a basic goal.
- What happens after the MySQL disk space is full (Database)
- struts2 completely the wrong way to capture 404 (Programming)
- How to use GRUB2 files directly from the hard disk to run ISO (Linux)
- Bootable ISO image using GRUB (Linux)
- How to monitor Linux system performance Nmon (Linux)
- Ten to improve the efficiency of the Linux bash tricks (Linux)
- Java concurrent programming combat (using synchronized synchronization method) (Programming)
- Oracle multi-table query optimization (Database)
- Linux automatically install service components and optimize the kernel parameters (Linux)
- Ubuntu is not in the sudoers file problem solving (Linux)
- Linux Network Security: nmap port scanning software (Linux)
- CentOS 5.11 Open VNC access (Linux)
- Achieve single backup of MySQL by innobackupex (Database)
- Linux device driver development small example --LED lights (Programming)
- Heartbeat cluster components Overview (Server)
- Mac Docker deploy development environment (Server)
- Atheros AR8161 / AR8162 network card driver problem solving in CentOS 6.4 (Linux)
- CentOS 6.5 upgrade to CentOS 7 (Linux)
- Git uses a basic tutorial (Linux)
- Java Class file format parsing (Programming)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.