MySQL高级-SQL优化- limit优化(覆盖索引加子查询)

文章目录

  • 0、limit 优化
    • 0.1、从表 tb_sku 中按照 id 列进行排序,然后跳过前 9000000 条记录
    • 0.2、通过子查询获取按照 id 排序后的第 9000000 条开始的 10 条记录的 id 值,然后在原表中根据这些 id 值获取对应的完整记录
  • 1、上传5个sql文件到 /root
  • 2、查看文件是否上传成功
  • 3、创建表 tb_sku 结构
  • 4、执行load指令将准备好的数据,加载到表结构中
  • 5、查看 表中的数据量
  • 6、查询分页前10条记录
  • 7、使用分页查询 limit 10,10
  • 8、分页查询 从第100万开始查询10条
  • 9、分页查询 从第500万开始查询10条
  • 10、分页查询 从第900万开始查询10条

0、limit 优化

一个常见又非常头疼的问题就是 limit 2000000,10。此时需要MySQL排序前2000010记录,仅仅返回2000000-2000010的记录,其他记录丢弃,查询排序的代价非常大。
优化思路:一般分页查询时,通过创建 覆盖索引 能够比较好地提高性能,可以通过 覆盖索引 加子查询形式进行优化。

0.1、从表 tb_sku 中按照 id 列进行排序,然后跳过前 9000000 条记录

mysql> select id from tb_sku order by id limit 9000000,10;
+---------+
| id      |
+---------+
| 9000001 |
| 9000002 |
| 9000003 |
| 9000004 |
| 9000005 |
| 9000006 |
| 9000007 |
| 9000008 |
| 9000009 |
| 9000010 |
+---------+
10 rows in set (9.03 sec)mysql> 

耗时(9.03 sec)
这种查询方式可能会非常慢,因为它需要读取并丢弃前 9,000,000 条记录才能到达你想要的起始位置

0.2、通过子查询获取按照 id 排序后的第 9000000 条开始的 10 条记录的 id 值,然后在原表中根据这些 id 值获取对应的完整记录

mysql> select s.* from tb_sku s,(select id from tb_sku order by id limit 9000000,10) a where s.id=a.id;
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| id      | sn                    | name              | price | num   | alert_num | image                                                                                                                      | images                                                                                                                     | weight | create_time         | update_time         | category_name | brand_name | spec          | sale_num | comment_num | status |
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| 9000001 | 100000003145009000001 | 华为Meta9000001   | 87901 |  9961 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 真皮包        | viney      | 白色9000001   |       39 |           0 | 1      |
| 9000002 | 100000003145009000002 | 华为Meta9000002   |     3 |  9946 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉拉裤        | 巴布豆     | 白色9000002   |       54 |           0 | 1      |
| 9000003 | 100000003145009000003 | 华为Meta9000003   | 78903 |  9993 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色9000003   |        7 |           0 | 1      |
| 9000004 | 100000003145009000004 | 华为Meta9000004   | 26604 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色9000004   |        0 |           0 | 1      |
| 9000005 | 100000003145009000005 | 华为Meta9000005   | 40805 |  9996 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色9000005   |        4 |           0 | 1      |
| 9000006 | 100000003145009000006 | 华为Meta9000006   | 89206 |  9930 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色9000006   |       70 |           0 | 1      |
| 9000007 | 100000003145009000007 | 华为Meta9000007   | 11707 |     4 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | vivo       | 白色9000007   |        1 |           0 | 1      |
| 9000008 | 100000003145009000008 | 华为Meta9000008   | 99808 |  9994 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000008   |        6 |           0 | 1      |
| 9000009 | 100000003145009000009 | 华为Meta9000009   | 41709 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000009   |        0 |           0 | 1      |
| 9000010 | 100000003145009000010 | 华为Meta9000010   | 23710 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000010   |        0 |           0 | 1      |
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
10 rows in set (9.44 sec)mysql> 

耗时(9.44 sec)

1、上传5个sql文件到 /root

在这里插入图片描述

注意 : 由于1000w的数据量较大 , 如果直接加载1000w , 会非常耗费CPU及内存 ; 已经拆分为5个部分 , 每一个部分为200w数据 , load 5次即可 ;

2、查看文件是否上传成功

[root@localhost ~]# ll
总用量 3653220
-rw-------. 1 root root      1533 124 2023 anaconda-ks.cfg
-rw-r--r--. 1 root root       191 625 13:29 dump6379.rdb
-rw-r--r--. 1 root root       191 625 13:31 dump6380.rdb
-rw-r--r--. 1 root root       191 625 13:32 dump6381.rdb
-rw-r--r--. 1 root root       583 624 11:13 dump.rdb
-rw-r--r--. 1 root root      1564 124 2023 initial-setup-ks.cfg
-rw-r--r--. 1 root root  57650380 222 2022 load_user_100w_sort.sql
drwxr-xr-x. 3 root root        18 18 18:11 minio
-rw-r--r--. 1 root root       141 625 17:00 nodes-6379.conf
-rw-------. 1 root root    178567 63 13:50 nohup.out
-rw-r--r--. 1 root root 733017638 222 2022 tb_sku1.sql
-rw-r--r--. 1 root root 737475921 628 19:39 tb_sku2.sql
-rw-r--r--. 1 root root 737504035 222 2022 tb_sku3.sql
-rw-r--r--. 1 root root 737525348 628 19:40 tb_sku4.sql
-rw-r--r--. 1 root root 737508325 222 2022 tb_sku5.sql
drwxr-xr-x. 2 root root         6 124 2023 公共
drwxr-xr-x. 2 root root         6 124 2023 模板
drwxr-xr-x. 2 root root         6 124 2023 视频
drwxr-xr-x. 2 root root         6 124 2023 图片
drwxr-xr-x. 2 root root         6 124 2023 文档
drwxr-xr-x. 2 root root         6 124 2023 下载
drwxr-xr-x. 2 root root         6 124 2023 音乐
drwxr-xr-x. 2 root root         6 124 2023 桌面
[root@localhost ~]# 

3、创建表 tb_sku 结构

mysql> CREATE TABLE `tb_sku` (->   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '商品id',->   `sn` varchar(100) NOT NULL COMMENT '商品条码',->   `name` varchar(200) NOT NULL COMMENT 'SKU名称',->   `price` int(20) NOT NULL COMMENT '价格(分)',->   `num` int(10) NOT NULL COMMENT '库存数量',->   `alert_num` int(11) DEFAULT NULL COMMENT '库存预警数量',->   `image` varchar(200) DEFAULT NULL COMMENT '商品图片',->   `images` varchar(2000) DEFAULT NULL COMMENT '商品图片列表',->   `weight` int(11) DEFAULT NULL COMMENT '重量(克)',->   `create_time` datetime DEFAULT NULL COMMENT '创建时间',->   `update_time` datetime DEFAULT NULL COMMENT '更新时间',->   `category_name` varchar(200) DEFAULT NULL COMMENT '类目名称',->   `brand_name` varchar(100) DEFAULT NULL COMMENT '品牌名称',->   `spec` varchar(200) DEFAULT NULL COMMENT '规格',->   `sale_num` int(11) DEFAULT '0' COMMENT '销量',->   `comment_num` int(11) DEFAULT '0' COMMENT '评论数',->   `status` char(1) DEFAULT '1' COMMENT '商品状态 1-正常,2-下架,3-删除',->   PRIMARY KEY (`id`) USING BTREE-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品表';
Query OK, 0 rows affected, 7 warnings (0.32 sec)mysql> show tables;
+-------------------+
| Tables_in_atguigu |
+-------------------+
| tb_sku            |
| tb_user           |
+-------------------+
2 rows in set (0.00 sec)mysql> 

4、执行load指令将准备好的数据,加载到表结构中

mysql> load data local infile '/root/tb_sku1.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1610 warnings (46.10 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1610mysql> load data local infile '/root/tb_sku2.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1540 warnings (42.06 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1540mysql> load data local infile '/root/tb_sku3.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1540 warnings (46.09 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1540mysql> load data local infile '/root/tb_sku4.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1540 warnings (41.28 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1540mysql> load data local infile '/root/tb_sku5.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1546 warnings (41.12 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1546mysql> 

5、查看 表中的数据量

mysql> select count(*) from tb_sku;
+----------+
| count(*) |
+----------+
| 10000000 |
+----------+
1 row in set (12.80 sec)mysql> 

6、查询分页前10条记录

mysql> select * from tb_sku limit 0,10;
+----+------------------+--------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+----------+----------+-------------+--------+
| id | sn               | name         | price | num   | alert_num | image                                                                                                                      | images                                                                                                                     | weight | create_time         | update_time         | category_name | brand_name | spec     | sale_num | comment_num | status |
+----+------------------+--------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+----------+----------+-------------+--------+
|  1 | 100000003145001  | 华为Meta1    | 87901 |  9961 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 真皮包        | viney      | 白色1    |       39 |           0 | 1      |
|  2 | 100000003145002  | 华为Meta2    |     3 |  9946 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉拉裤        | 巴布豆     | 白色2    |       54 |           0 | 1      |
|  3 | 100000003145003  | 华为Meta3    | 78903 |  9993 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色3    |        7 |           0 | 1      |
|  4 | 100000003145004  | 华为Meta4    | 26604 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色4    |        0 |           0 | 1      |
|  5 | 100000003145005  | 华为Meta5    | 40805 |  9996 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色5    |        4 |           0 | 1      |
|  6 | 100000003145006  | 华为Meta6    | 89206 |  9930 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色6    |       70 |           0 | 1      |
|  7 | 100000003145007  | 华为Meta7    | 11707 |     4 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | vivo       | 白色7    |        1 |           0 | 1      |
|  8 | 100000003145008  | 华为Meta8    | 99808 |  9994 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色8    |        6 |           0 | 1      |
|  9 | 100000003145009  | 华为Meta9    | 41709 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9    |        0 |           0 | 1      |
| 10 | 1000000031450010 | 华为Meta10   | 23710 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色10   |        0 |           0 | 1      |
+----+------------------+--------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+----------+----------+-------------+--------+
10 rows in set (0.01 sec)mysql> 

耗时(0.01 sec)

7、使用分页查询 limit 10,10

mysql> select * from tb_sku limit 10,10;
+----+------------------+--------------+-------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+-------------------------+----------+----------+-------------+--------+
| id | sn               | name         | price | num   | alert_num | image                                                                                                                    | images                                                                                                                   | weight | create_time         | update_time         | category_name | brand_name              | spec     | sale_num | comment_num | status |
+----+------------------+--------------+-------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+-------------------------+----------+----------+-------------+--------+
| 11 | 1000000031450011 | 华为Meta11   | 86111 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp     | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp     |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红                  | 白色11   |        0 |           0 | 1      |
| 12 | 1000000031450012 | 华为Meta12   | 11312 |  9999 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色12   |        1 |           0 | 1      |
| 13 | 1000000031450013 | 华为Meta13   | 99013 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色13   |        0 |           0 | 1      |
| 14 | 1000000031450014 | 华为Meta14   | 75314 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/4364/38/240/219619/5b909979E13d29469/7c908af4d61cf659.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/4364/38/240/219619/5b909979E13d29469/7c908af4d61cf659.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色14   |        0 |           0 | 1      |
| 15 | 1000000031450015 | 华为Meta15   | 69915 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色15   |        0 |           0 | 1      |
| 16 | 1000000031450016 | 华为Meta16   |  5916 |  9997 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色16   |        3 |           0 | 1      |
| 17 | 1000000031450017 | 华为Meta17   | 30517 |  9960 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25957/363/1290162041/159777/41fe0e72/5b908f41N4884b765.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25957/363/1290162041/159777/41fe0e72/5b908f41N4884b765.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色17   |       40 |           0 | 1      |
| 18 | 1000000031450018 | 华为Meta18   | 63818 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/4364/38/240/219619/5b909979E13d29469/7c908af4d61cf659.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/4364/38/240/219619/5b909979E13d29469/7c908af4d61cf659.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色18   |        0 |           0 | 1      |
| 19 | 1000000031450019 | 华为Meta19   |    20 |  9995 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25957/363/1290162041/159777/41fe0e72/5b908f41N4884b765.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25957/363/1290162041/159777/41fe0e72/5b908f41N4884b765.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色19   |        5 |           0 | 1      |
| 20 | 1000000031450020 | 华为Meta20   | 94020 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/3876/25/222/165387/5b908202E95fa6558/6b8fd41266c11cd5.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/3876/25/222/165387/5b908202E95fa6558/6b8fd41266c11cd5.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色20   |        0 |           0 | 1      |
+----+------------------+--------------+-------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+-------------------------+----------+----------+-------------+--------+
10 rows in set (0.00 sec)mysql> 

耗时(0.00 sec)

8、分页查询 从第100万开始查询10条

mysql> select * from tb_sku limit 1000000,10;
+---------+-----------------------+-------------------+--------+-------+-----------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| id      | sn                    | name              | price  | num   | alert_num | image                                                                                                                   | images                                                                                                                  | weight | create_time         | update_time         | category_name | brand_name | spec          | sale_num | comment_num | status |
+---------+-----------------------+-------------------+--------+-------+-----------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| 1000001 | 100000003145001000001 | 华为Meta1000001   |  92001 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 又一春     | 白色1000001   |        0 |           0 | 1      |
| 1000002 | 100000003145001000002 | 华为Meta1000002   |  52002 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 又一春     | 白色1000002   |        0 |           0 | 1      |
| 1000003 | 100000003145001000003 | 华为Meta1000003   |  70003 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 又一春     | 白色1000003   |        0 |           0 | 1      |
| 1000004 | 100000003145001000004 | 华为Meta1000004   |  93904 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000004   |        0 |           0 | 1      |
| 1000005 | 100000003145001000005 | 华为Meta1000005   |  34805 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000005   |        0 |           0 | 1      |
| 1000006 | 100000003145001000006 | 华为Meta1000006   |  57606 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000006   |        0 |           0 | 1      |
| 1000007 | 100000003145001000007 | 华为Meta1000007   |  76307 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000007   |        0 |           0 | 1      |
| 1000008 | 100000003145001000008 | 华为Meta1000008   | 101008 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000008   |        0 |           0 | 1      |
| 1000009 | 100000003145001000009 | 华为Meta1000009   |  16609 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000009   |        0 |           0 | 1      |
| 1000010 | 100000003145001000010 | 华为Meta1000010   |  20610 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000010   |        0 |           0 | 1      |
+---------+-----------------------+-------------------+--------+-------+-----------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
10 rows in set (2.01 sec)mysql> 

耗时(2.01 sec)

9、分页查询 从第500万开始查询10条

mysql> select * from tb_sku limit 5000000,10;
+---------+-----------------------+-------------------+--------+-------+-----------+------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| id      | sn                    | name              | price  | num   | alert_num | image                                                                                                                  | images                                                                                                                 | weight | create_time         | update_time         | category_name | brand_name | spec          | sale_num | comment_num | status |
+---------+-----------------------+-------------------+--------+-------+-----------+------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| 5000001 | 100000003145005000001 | 华为Meta5000001   |  83301 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000001   |        0 |           0 | 1      |
| 5000002 | 100000003145005000002 | 华为Meta5000002   | 127202 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000002   |        0 |           0 | 1      |
| 5000003 | 100000003145005000003 | 华为Meta5000003   | 145403 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000003   |        0 |           0 | 1      |
| 5000004 | 100000003145005000004 | 华为Meta5000004   | 127004 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000004   |        0 |           0 | 1      |
| 5000005 | 100000003145005000005 | 华为Meta5000005   |  95805 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000005   |        0 |           0 | 1      |
| 5000006 | 100000003145005000006 | 华为Meta5000006   | 105306 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000006   |        0 |           0 | 1      |
| 5000007 | 100000003145005000007 | 华为Meta5000007   |  81707 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000007   |        0 |           0 | 1      |
| 5000008 | 100000003145005000008 | 华为Meta5000008   | 140008 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000008   |        0 |           0 | 1      |
| 5000009 | 100000003145005000009 | 华为Meta5000009   | 134109 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000009   |        0 |           0 | 1      |
| 5000010 | 100000003145005000010 | 华为Meta5000010   |  98210 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22147/88/2343365802/108958/ebe4bd23/5b51adb8N9bcfa164.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22147/88/2343365802/108958/ebe4bd23/5b51adb8N9bcfa164.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000010   |        0 |           0 | 1      |
+---------+-----------------------+-------------------+--------+-------+-----------+------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
10 rows in set (7.68 sec)mysql> 

耗时(7.68 sec)

10、分页查询 从第900万开始查询10条

mysql> select * from tb_sku limit 9000000,10;
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| id      | sn                    | name              | price | num   | alert_num | image                                                                                                                      | images                                                                                                                     | weight | create_time         | update_time         | category_name | brand_name | spec          | sale_num | comment_num | status |
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| 9000001 | 100000003145009000001 | 华为Meta9000001   | 87901 |  9961 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 真皮包        | viney      | 白色9000001   |       39 |           0 | 1      |
| 9000002 | 100000003145009000002 | 华为Meta9000002   |     3 |  9946 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉拉裤        | 巴布豆     | 白色9000002   |       54 |           0 | 1      |
| 9000003 | 100000003145009000003 | 华为Meta9000003   | 78903 |  9993 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色9000003   |        7 |           0 | 1      |
| 9000004 | 100000003145009000004 | 华为Meta9000004   | 26604 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色9000004   |        0 |           0 | 1      |
| 9000005 | 100000003145009000005 | 华为Meta9000005   | 40805 |  9996 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色9000005   |        4 |           0 | 1      |
| 9000006 | 100000003145009000006 | 华为Meta9000006   | 89206 |  9930 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色9000006   |       70 |           0 | 1      |
| 9000007 | 100000003145009000007 | 华为Meta9000007   | 11707 |     4 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | vivo       | 白色9000007   |        1 |           0 | 1      |
| 9000008 | 100000003145009000008 | 华为Meta9000008   | 99808 |  9994 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000008   |        6 |           0 | 1      |
| 9000009 | 100000003145009000009 | 华为Meta9000009   | 41709 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000009   |        0 |           0 | 1      |
| 9000010 | 100000003145009000010 | 华为Meta9000010   | 23710 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000010   |        0 |           0 | 1      |
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
10 rows in set (14.51 sec)mysql> 

耗时(14.51 sec)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/364088.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【工具推荐】ONLYOFFICE 桌面编辑器 8.1:引入全新功能,提升文档处理体验

ONLYOFFICE 桌面编辑器 8.1 现已发布:功能完善的 PDF 编辑器、幻灯片版式、改进从右至左显示、新的本地化选项等 【工具推荐】ONLYOFFICE 桌面编辑器 8.1:引入全新功能,提升文档处理体验 一、什么是ONLYOFFICE? ONLYOFFICE 是…

PG备份与恢复

一、开启WAL归档 1、创建归档目录 我们除了存储数据目录pgdata之外,还要创建backups,scripts,archive_wals文件 mkdir -p /home/mydba/pgdata/arch mkdir -p /home/mydba/pgdata/scripts mkdir -p /home/mydba/backups chown -R mydba.myd…

API接口知识小结

应用程序接口API(Application Programming Interface),是提供特定业务输出能力、连接不同系统的一种约定。这里包括外部系统与提供服务的系统(中后台系统)或后台不同系统之间的交互点。包括外部接口、内部接口&#xf…

ANSYS Electronics 电磁场仿真工具下载安装,ANSYS Electronics强大的功能和灵活性

ANSYS Electronics无疑是一款在电磁场仿真领域表现卓越的软件工具。它凭借强大的功能和灵活性,帮助用户在产品设计阶段就能精确预测和优化电磁场性能,从而极大地降低了实际测试成本,并显著提升了产品的可靠性。 这款软件不仅在电子设计领域有…

Python | Leetcode Python题解之第204题计数质数

题目: 题解: MX5000000 is_prime [1] * MX is_prime[0]is_prime[1]0 for i in range(2, MX):if is_prime[i]:for j in range(i * i, MX, i):#循环每次增加iis_prime[j] 0 class Solution:def countPrimes(self, n: int) -> int:return sum(is_prim…

如何利用ChatGPT改善日常生活:一个普通人的指南

当你打开 ChatGPT,显现的是一个简洁的聊天界面。 许多人利用 ChatGPT 进行日常对话。 然而,ChatGPT 的功能远不止于此。 对话只是其众多能力中的一种,如果仅将其视为高级版的聊天机器人,那未免低估了它。 AI 在信息处理方面的…

【SpringMVC】_SpringMVC实现留言墙

目录 1. 需求分析 2. 接口定义 2.1 提交留言 2.2 获取全部留言 3. 响应数据 4. 服务器代码 4.1 MessageInfo 文件 4.2 MessageController 文件 5. 前端页面代码 5. 运行测试 1. 需求分析 实现如下页面: 1、输入留言信息,点击提交后&#xff0…

【算法专题--链表】两数相加 -- 高频面试题(图文详解,小白一看就懂!!)

目录 一、前言 二、题目描述 三、解题方法 ⭐双指针 -- 模拟进位 (使用哨兵位头节点) 🥝 什么是哨兵位头节点? 🍇思路解析 🍍案例图解 四、总结与提炼 五、共勉 一、前言 两数相加 这道题,可以说是--…

如何用一个二维码实现企业固定资产管理?

固定资产管理中普遍存在盘点难、家底不清、账实不一致、权责不清晰等问题。如果平时不规范化执行,年终面对上上下下、大大小小、成百上千件物资要进行盘点整理的时候,会是十分痛苦且低效的事情。 今天这篇文章就来给大家推荐几家便宜好用的二维码固定资…

CST--如何在PCB三维模型中自由创建离散端口

在使用CST电磁仿真软件进行PCB的三维建模时,经常会遇到不能自动创建离散端口的问题,原因有很多,比如:缺少元器件封装、开路端口、多端子模型等等,这个时候,很多人会选择手动进行端口创建,但是&a…

Python:探索高效、智能的指纹识别技术(简单易懂)

目录 概括 导入库 函数一 参数: 函数二 函数三 主函数 运行结果 src: model_base 7.bmp ​编辑 总结 概括 指纹识别是一种基于人体生物特征的身份验证技术。它通过捕捉和分析手指上的独特纹路和细节特征,实现高准确度的身份识别。…

镜头下的光学

说实话,当我看到几何光学的内容全是初中的解析几何的时候,我就觉得讲的方式太原始了,而且太过复杂也看不懂。所以我尝试做了数学建模,发现建模之后模型可以解释一些物理现象,也不会有矛盾的地方,那就算过得…

Tips汇总

爬虫领域 1. 加密参数值 Failed to load 在采集时遇到一个加密参数 Token,搜索 Token 的值,如果是从前面包中返回的,那相对比较好解决,因此进行搜索,却没有搜索到,那我就认为它是加密的算法。 这里其实有…

【全球首个开源AI数字人】DUIX数字人-打造你的AI伴侣!

目录 1. 引言1.1 数字人技术的发展背景1.2 DUIX数字人项目的开源意义1.3 DUIX数字人技术的独特价值1.4 本文目的与结构 2. DUIX数字人概述2.1 定义与核心概念2.2 硅基智能与DUIX的关系2.3 技术架构2.4 开源优势2.5 应用场景2.6 安全与合规性 3. DUIX数字人技术特点3.1 开源性与…

学习gateway网关路由时遇到的问题

遇到这个问题先别慌,我们首先要检查是哪里出问题了,从报错信息中我们可以看到,他说 Unable to find GatewayFilterFactory with name -AddRequestHeader 找不到这个路由过滤器,所以导致网关设置失败,从这条信息上我…

我的北航MEM成长之旅

领完毕业证,2年的学业生涯到此结束。为了方便大家理解后续的内容,这里我们先解释下基本信息,比如MEM到底是个啥?以及北航的MEM都学什么? 1 MEM解读 1.1 MEM是什么? MEM是"Master of Engineering Ma…

如何用CSS样式实现一个优雅的渐变效果?

CSS渐变效果 CSS渐变(Gradients)是一种让两种或多种颜色平滑过渡的视觉效果,广泛应用于网页背景、按钮、边框等,以创造丰富的视觉体验。CSS提供了线性渐变(Linear Gradients)和径向渐变(Radial…

用英文介绍美国总统:Barack Obama First African-American President (2009 – 2017)

Barack Obama: First African-American President (2009 – 2017) Link: https://www.youtube.com/watch?vwHCBI3yypmE&listPLybg94GvOJ9E-ZM1U6PAjgPUmz-V4-Yja&index44 Introduction Barack Obama made history as the first African-American elected to the pre…

《mysql篇》--查询(进阶)

目录 将查询结果作为插入数据 聚合查询 聚合函数 count sum group by子句 having 联合查询 笛卡尔积 多表查询 join..on实现多表查询 内连接 外连接 自连接 子查询 合并查询 将查询结果作为插入数据 Insert into 表2 select * from 表1//将表1的查询数据插入…

Python逻辑控制语句 之 判断语句--if、if else 和逻辑运算符结合

逻辑运算符: and or not 1.案例一 需求: 1. 获取⽤户输⼊的⽤户名和密码 2. 判断⽤户名是 admin 并且密码是 123456 时, 在控制台输出: 登录成功! 3. 否则在控制台输出: 登录信息错误! # 需求: # 1. 获取用户输入的用户名和密码 # 2. 判断…