Found a total of 10000 related content
Query nearby location information based on longitude and latitude
Article Introduction:Now there is such a demand. I want to query the five nearby locations within two kilometers in the data table based on the longitude and latitude of the current location. If the query result does not include five locations, I want to expand the nearby range until five locations are found. I thought of two options: The first option is to completely use SQL statements to implement...
2016-10-22
comment 0
1752
Query nearby location information based on longitude and latitude
Article Introduction:Now there is such a demand. I want to query the five nearby locations within two kilometers in the data table based on the longitude and latitude of the current location. If the query result does not include five locations, I want to expand the nearby range until five locations are found. I thought of two options: The first option is to completely use SQL statements to implement...
2016-10-22
comment 0
2582
How to query all table and field information in mysql
Article Introduction:Mysql method of querying all table and field information: 1. Get all table information based on the library name [information_schema.`TABLES`]; 2. Get all field information based on the library name [ORDINAL_POSITION AS 'Column order'].
2020-10-28
comment 1
7031
一个PHP页面中有多条查询语句,导致页面打开速度特别慢,怎么处理
Article Introduction:
一个PHP页面中有多条查询语句,导致页面打开速度特别慢,怎么办下面的代码有点乱,我简单解释一下吧。首先从部门表中查询出部门记录,然后根据部门ID查询出用户表中部门对应的用户,然后根据用户ID查询出日志表中用户对应的日志,然后再根据日志ID查询出审核表中领导的审核记录……,大概就是这样一层调用一层,导致打开页面需要1分钟左右。我估计是扫描数据表的次数过多造
2016-06-13
comment 0
994
How springboot implements the user name search function
Article Introduction:In order to implement the function of querying users based on user names, we need to write several classes in the springboot framework: 1. UserEnetity class, which is an entity class based on the database table and is used to encapsulate the user's basic information. In this table, user-related attributes need to be defined and getter and setter methods provided. publicclassUserEntity{@Id@GeneratedValue(strategy=GenerationType.IDENTITY)privateintid;privateStringname;publicStringgetUsername(
2023-05-13
comment 0
1238
There is a problem with the query results when Mysql joins multiple tables
Article Introduction:Because of the needs of the company's products, we now need to implement a function. Table A stores the basic information of users, and Table B stores some behaviors of users in Table A. Table C and Table B have the same properties. When querying, you can sort according to the count results in table B or table C, so I thought of join, but something happened...
2016-09-29
comment 0
1638
MySQL related query problem?
Article Introduction:There are currently three tables: A B C The relationship between A and B, A.uid = B.id The relationship between B and C, B.uid = C.id Now if you want to query table A directly through a MySQL statement, you can pass Table B can find out the information of table C, such as left join, etc., please give me a demonstration sql statement...
2016-08-04
comment 0
1164
How to use where query statement in mysql
Article Introduction:In mysql, the where statement is often used in conjunction with the SELECT statement to specify the conditions of the query. The syntax is "SELECT field list FROM data table name WHERE query conditions;"; the where statement can read the specified field value based on the field value in the mysql table. The data.
2022-05-19
comment 0
8788
In-depth understanding of optimizing SQL queries - specific analysis of how to write high-performance SQL statements
Article Introduction:The execution plan is a query plan made by the database based on the statistical information of the SQL statement and related tables. This plan is automatically analyzed and generated by the query optimizer. For example, if a SQL statement is used to query 1 record from a table with 100,000 records, records, the query optimizer will choose the "index search" method. If the table is archived and there are currently only 5,000 records left, the query optimizer will change the plan and use the "full table scan" method.
2017-03-09
comment 1
1665
How to write high-performance SQL queries
Article Introduction:The execution plan is a query plan made by the database based on the statistical information of the SQL statement and related tables. This plan is automatically analyzed and generated by the query optimizer. For example, if a SQL statement is used to query 1 record from a table with 100,000 records, records, the query optimizer will choose the "index search" method. If the table is archived and there are currently only 5,000 records left, the query optimizer will change the plan and use the "full table scan" method.
2017-03-19
comment 1
1218
Optimizing SQL queries: How to write high-performance SQL statements
Article Introduction:The execution plan is a query plan made by the database based on the statistical information of the SQL statement and related tables. This plan is automatically analyzed and generated by the query optimizer. For example, if a SQL statement is used to query 1 record from a table with 100,000 records, records, the query optimizer will choose the "index search" method. If the table is archived and there are currently only 5,000 records left, the query optimizer will change the plan and use the "full table scan" method.
2017-04-29
comment 0
1193
What file is mysqlfrm file?
Article Introduction:The .frm file in MySQL refers to the file that stores the table definition and structure. It is based on the table name and corresponds to each MySQL table. It contains the metadata information of the table, including column names, data types, indexes, constraints, etc. When When the database starts, MySQL will read the information in the .frm file to restore the table structure, and use this information to perform operations such as data query, insertion, update, and deletion.
2023-07-25
comment 0
2381
How to query and create tables in MySQL
Article Introduction:MySQL is one of the most popular relational database systems and is widely used in website development, data analysis and other fields. In MySQL, query is one of the most basic operations, and table creation is to create the table structure in the database. This article will introduce how to query and create tables in MySQL. 1. Query In MySQL, the query uses the SELECT statement. The SELECT statement has many different options that allow you to retrieve data based on established criteria, as shown below: SELECT column_name FROM tabl
2023-04-21
comment 0
3143
What are the MySql query methods?
Article Introduction:Add insertintoBselect*fromA; //Add the information of table A to table B through query to aggregate query count; //Return to the sum of the data in the query; //Return to the sum of the data in the query (only meaningful for numbers) ) Only meaningful for numbers avg/max/min;//Return the average/maximum/minimum value of the query data (only meaningful for numbers) Group query select*from table name groupby grouping conditions; here, the grouping is performed first, Then execute the aggregate function of each group based on the grouping. Conditional query having; after the groupby clause is used for grouping, you can use having when you need to conditionally filter the grouped results. w
2023-05-26
comment 0
1538
php 依据输入 开始时间 结束时间 获取数据库中表中记录
Article Introduction:
php 根据输入 开始时间 结束时间 获取数据库中表中记录我要做的是一个统计页面 查询条件是根据输入(js点击选择时间)开始时间 结束时间 点确定按钮查询这时间段记录
数据库字段:
id int(10)
ip varchar(50)
time varchar(50)
type varc
2016-06-13
comment 0
1344
Discuss in detail mysql query locked table
Article Introduction:MySQL is an open source software based on a relational database management system. It is widely used in applications and provides developers with a reliable way to store data. However, because MySQL is prone to problems maintaining locked tables when processing large amounts of data, developers need to know how to query locked tables. When developing with MySQL, you often encounter the need to query locked tables. MySQL provides a variety of ways to query the currently locked table, including using command line tools, querying system views and querying information models.
2023-04-17
comment 0
1021