Recently, a third-party called API has been developed for a self-developed software platform. If the returned result set is in JSON format, it is easier to develop it in other languages, I found a lot of information on the Internet and didn't find it very suitable. Finally, I decided to change my mind to write a general one based on the information on the Internet.
The main application scenario of this method is to convert the
SQL, Structured query Language Structured Query Language , is a database query and programming language for accessing data and querying, updating, and managing relational database systems. SQL language contains 4 sections:※ data definition language (DDL) create ,
How can I convert Oracle queries to queries in the SQL database? The following describes how to convert an Oracle query to an SQL query. If you are interested in Oracle query, take a look.
Oracle's TO_CHAR function can convert the n-bit NUMBER data type to the VARCHAR2 data
Original address: http://www.cnblogs.com/lyhabc/p/3367274.htmlBefore reading this article, you can read the following article firstSQL Server's unique task scheduling algorithm "Sqlos"Task Scheduler for SQL Server Sqlos [go]Translated from:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/Http://www.codeproject.com/Articles/630346/Underst
:
Reduce the size of the index
Indexes are reduced, resulting in faster queries to the index
Small index for adding and removing changes in the maintenance performance will be higher
For example, the following statement: After we have set up a clustered index for it: At this point we add filter conditions to form a filtered index: From the above we can see that the use of filtered index of the scene to be related to the specific business scenario, for a large number of
. Create new tables for different entities and then query them through connections.The connection can be established in the FROM clause or WHERE clause of the SELECT statement. It is similar that it helps to distinguish the connection operation FROM the search conditions in the WHERE clause when the clause points out the connection. Therefore, this method is recommended in Transact-SQL.The connection syntax format
Original: SQL Server 2012:SQL Server architecture--The life cycle of a query (part 2nd)Planning cache (Plan caches)If SQL Server has found a good way to execute a piece of code, it should be reused as a subsequent request because Generating execution plans is time-consuming and resource-intensive, There is a point in d
, if a null value is contained, we do not want to be indexed, or according to the specific business scenario, we do not want to index some data. You can:
Reduce index size
The index is reduced to accelerate the query of the index.
Small indexes provide higher maintenance performance for addition, deletion, and modification.
For example, the following statement:
After we create a clustered index for it:
In this case, we add
Tags: index solution based on keyword har results in SQL Server failure efficiencyProblem: There's a lot of data on both tables. The A1 field in a table needs to be associated with the B table primary key query A1 field stores multiple B table primary keys The format is: Format 1:B1,B2,B3
+tree, and gives several engineering scenarios using explain to optimize SQL, also worth intensive reading. Resources1. MySQL Doc:explain Syntax2. MySQL doc:explain Output Format3. MySQL Doc:select Syntax about Straight_join4. MySQL doc:optimizing Queries with EXPLAIN5. MySQL Doc:nested-loop Join Algorithms6. PDF Presentation from Oreilly.com:Explain demystified7. Slideshare:mysql Explain Explained8. mysql indexing principle and slow
Today in the Member management system search, I found that the previous search time is not too scientific, efficiency is not too high. By the time the query is specified, I have this time format in the database "2007-5-22 14:32:12" When we inquire whether 2007-5-22 is equal to it, the result is not equal.We all like to find other ways to solve this problem. But I find that our methods are not very good, bec
through David Durante , 2011/10/05the seriesThis article is part of the stair series: Ladder index for SQL ServerThe basis of the index database design tells the developer to use the intent of the Database Designer. Unfortunately, the index is often followed by a performance problem that arises. Finally here is a simple series of articles that should allow any database professional to quickly "accelerate"Th
19.3.1 SQL Query Analyzer Introduction
SQL Query Analyzer is a graphical management tool that is used to write, test Transact-SQL statements, and batch processing. System administrators and developers can learn how to improve performance of
[MySQL Notes] SQL optimization tool-explain the output format of the explain command
If you have experience using MySQL, you may encounter slow SQL queries in your project. In some scenarios, you can easily locate the problem (for example, when a single table operation has slow SQL queries, check the
Essential SQL query optimization techniques to speed up Website access and SQL access
In this article, I will introduce how to identify queries that cause performance problems, how to locate their problems, and how to quickly fix these problems and other methods to speed up the query.
You must know that a website with
Tags: style blog io color SP data div on 20141 ---------------------------Connection Query--------------------------------2 --cross-connect queries3 --A subquery can be placed before the from to replace the displayed information4 SelectName asName, Sex,age, (SelectName fromBumenwhereBumen.code=Biao2.bumen) department, (SelectCeo fromBumenwhereBumen.code=Biao2.bumen) asCeo fromBiao25 --Connection query Two t
Date formatting statement and SQL Server statement during SQL Server Query
The default datetime format of the Chinese version of SQL Server isyyyy-mm-dd Thh:mm:ss.mmm
For example:
select getdate() 2004-09-12 11:06:08.177
I sorted out the date
after I've written the entire statement.The first statement I wrote was:
1234
SELECTCOUNT(DISTINCTcust_id) AScount_customersFROMcustomers
Result:
Count_customers
"10″
This query is important because it follows the first principle (external link). Because there is no SQL connection, so there is no dependency, I know this is th
to store data bits.
Double-byte data.
Date type
Date short date format (1990-10-10)
Timestamp long Date Format (10:10:10)
Number Type
Number (2), which represents a two-digit integer.
Number (3, 2) indicates that it is declared as a three-digit number, and there are two digits after the decimal point.
Text-Lob Data Type
BLOB: stores images, audio files, videos, and other files.
Clob: a large object in char
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.