based on Simple SQL Statement of SQL analytic principle and its application in big Data
Li Wanhong
The common people call for the local tyrants to divide the field, together rich, will someday realize.
Get a complete picture of what you don't know about aliens and the universe really want: Http://pan.baidu.com/s/1c1utFDQ
Http://blog.sina.com.cn/s/blog_89436e570102w8qs.html
Http://blog.sina.com.cn/contn
8 years later, China will unify the world in 2024!
Hehe, the earth is entering light from darkness. Aliens are helping the Earth villagers!
Oh, the aliens are objective, the Star Alliance is to save the Earth. Millions of planetary spacecraft are orbiting the Earth, to help the evolution of the Earth civilization, human civilization will leap into the cosmic civilization, each individual material wealth, spiritual wealth will be a complete prosperity of Datong, please read more relevant information. It will be clear where we come from, what is the root cause of all the Earth's problems, and where are we headed?
。
。。
Ufo=universe family One. We are part of the cosmic family, and the light forces of the entire universe are now helping the Earth to eradicate tyranny. The establishment of Communist Buddhism in the Datong prosperous age. We are a family, we should love each other together, brave revolution, the earth will be more beautiful!
The rise and fall of the world stake, we all have a duty to help the liberation of mankind and the progress of civilization, and every person will be the beneficiary!
The work is in the contemporary.
South No Amitabha Buddha!
What about buzz, hum!
The critical point of the human will determines the speed at which events occur, that is, the degree of human Awakening, the degree of cognition and desire for events, determines when events occur ... so please call your friends around to participate in the event meditation, accelerate the event, accelerate the liberation of the Earth! Wonderful yourself. Scatter love!
。
We have lived on the outer planets in the cycle of life and death. Aliens are our brothers and sisters, the World family, Blind Date and love. Now, the Earth Man is enslaved, and we shall revolt. To brave the revolution, to establish a bright and just global village, a utopia of Xanadu, Communist Buddhist global village. We are all happy and never have to bear the heavy economic pressure. Alien high-tech, to the earth to bring infinite material wealth, everyone is happy unlimited!
We can transfer this text to a friend and share the happiness after 8 years in advance!
SQL syntax parsing is usually based on Lex, yacc > based on analysis, the performance is not high. Assuming that parsing is based on an SQL statement that does not have subqueries, the speed is much higher, and the principle is explained here.
General SQL statements are complex, including multiple layers of nesting. But there are rules to follow. It is characterized by the same basic pattern of all statements, that is, a simple statement of the SELECT from WHERE type. Therefore, the ability to parse nested statements into such simple statements by article. Because the syntax of the SQL statement is the same. So we can parse the statement by recursive method, and parse the SQL statement into several simple sub - SQL statements. These sub-SQL statements are then parsed by a single method . This process. The algorithm is simple and effective. Greatly improves performance and is a revolutionary new way of thinking about SQL parsing.
Big data is usually used HBASE wait NOSQL , for SQL very inconvenient for development. For this reason, it is useful to use a distributed relational database to preserve big data, such as using ORACLE,MYSQL to save a table library to multiple databases, This allows for the processing of massive amounts of data and for traditional programming, supporting MYBATIS,SPRING,HIBERNATE . Development is extremely convenient.
The corresponding difficulty is the uniqueness of the ID of each library table and the processing of the SQL statement.
for ID the uniqueness of the solution is not difficult, the key lies in the distributed SQL the processing.
With the advent of big data software such as SPARK, the processing of distributed data is justified.
can useSPARKto process the distributed data. So how do we get this data? To this end, the proposedSQLThe Analytic principleSQLstatement to parse a complexSQLthe statement resolves to a much simplerSQLstatements, such asSELECT a.*form USER A WHERE a.id>222, and then find it through a data dictionaryUSERThe corresponding sub-library, run the query on each sub-library, and then use the results of each querySPARKprocessing, for other sub-SQLstatement, and then according to the masterSQLthe conditions of the statement are as followsJOIN,GROUP by,ORDER byand so on all the query data for the Operation summary processing, and finally return the results.
In short, by getting each simple sub- SQL statement for parsing or statement decomposition. is a good and effective way. Simple and ingenious to overcome a common problem, especially for the use of high-efficiency database processing Big Data has special significance, it lays a cornerstone. This is an extremely effective way to solve this problem. Worth the application.
2014-10-17
The principle of SQL parsing based on simple SQL statement and its application in big data