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

news2024/12/30 0:49:47

文章目录

  • 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: 1610

mysql> 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: 1540

mysql> 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: 1540

mysql> 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: 1540

mysql> 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: 1546

mysql> 

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.coloradmin.cn/o/1873919.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

AV Foundation学习笔记二 - 播放器

ASSets AVFoundation框架的最核心的类是AVAsset,该类是整个AVFoundation框架设计的中心。AVAsset是一个抽象的(意味着你不能调用AVAsset的alloc或者new方法来创建一个AVAsset实例对象,而是通过该类的静态方法来创建实例对象)、不…

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

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

多地高温持续“热力”爆表 约克VRF中央空调带你清凉舒爽一夏

“出门5分钟,流汗2小时”,夏季高温天气,怎一个“热”字了得?6月以来,我国多地迎来高温“炙烤”,全国出现40℃以上高温的范围持续增加,随着中央气象台高温预警持续拉响,人们都很纳闷:…

springboot + Vue前后端项目(第二十一记)

项目实战第二十一记 写在前面1. springboot文件默认传输限制2. 安装视频插件包命令3. 前台Video.vue4. 创建视频播放组件videoDetail.vue5. 路由6. 效果图总结写在最后 写在前面 本篇主要讲解系统集成视频播放插件 1. springboot文件默认传输限制 在application.yml文件中添…

5. Spring IoCDI ★ ✔

5. Spring IoC&DI 1. IoC & DI ⼊⻔1.1 Spring 是什么?★ (Spring 是包含了众多⼯具⽅法的 IoC 容器)1.1.1 什么是容器?1.1.2 什么是 IoC?★ (IoC: Inversion of Control (控制反转))总…

2.用BGP对等体发送路由

2.用BGP对等体发送路由 实验拓扑: 实验要求:用BGP对等体发送路由信息 实验步骤: 1.完成基本配置(略) 2.建立BGP对等体(略) 3.创建路由信息(用创建一个loop back接口就能产生一个直连…

毅速丨金属3D打印是制造业转型升级的重要技术

随着科技的进步,金属3D打印技术已成为制造业升级的重要驱动力。它以其独特的优势,正引领着制造业迈向新的未来。 金属3D打印技术的突破: 设计自由。金属3D打印能制造任意形状和结构的零件,为设计师提供了无限的创意空间。 快速制…

AI数据分析003:用kimi生成一个正弦波数学动画

文章目录 一、正弦波公式二、输入内容三、输出内容一、正弦波公式 ƒ(x) = a * sin(x + x0) + b 公式中: a: 决定正弦函数振动幅度的大小; x0:表示x开始比0拖后的弧度值; b:表示函数偏离X轴的距离; 对于难以理解的学生来说,可以用动画把这个公式直观的展现出来。 二…

深入理解 XML 和 HTML 之间的区别

在现代网络技术的世界中,XML(可扩展标记语言)和 HTML(超文本标记语言) 是两个非常重要的技术。尽管它们都使用标签和属性的格式来描述数据,但它们在形式和用途上有显著的区别。 概述 什么是 XML&#xff…

【51单片机入门】数码管原理

文章目录 前言共阴极与共阳极数码管多个数码管显示原理 总结 前言 在我们的日常生活中,数码管被广泛应用于各种电子设备中,如电子表、计时器、电子钟等。数码管的主要功能是显示数字和一些特殊字符。在这篇文章中,我们将探讨数码管的工作原理…

搭建ASPP:多尺度信息提取网络

文章目录 介绍代码实现 介绍 ASPP(Atrous Spatial Pyramid Pooling),空洞空间卷积池化金字塔。简单理解就是个至尊版池化层,其目的与普通的池化层一致,尽可能地去提取特征。ASPP 的结构如下: 如图所示&…

容联云容犀Desk在线客服:全渠道+全场景+全智能辅助,提升客户体验

如今,客户体验已经从基础的对话、交易、业务办理,转变为深度的生活联结、情感共鸣、价值认可。客户期待的转变,也让更多企业越发重视“以客户为中心”的业务增长战略。 容犀Desk营销服统一体验工作空间应运而生,其核心能力在线客…

INDEMIND:智效赋能,让服务机器人服务于人

商用清洁机器人的价值战。 随着行业发展势头回归冷静,“卖家秀”时代成为过去,机器人拼技术、拼产品的价值战时代已然到来。 庞大的前景是香饽饽也是镜中花 作为被业内寄予厚望的服务机器人之一,背后的信心是来自于明确的需求和庞大的市场…

JAVA-矩阵置零

给定一个 m x n 的矩阵,如果一个元素为 0 ,则将其所在行和列的所有元素都设为 0 。请使用 原地 算法。 思路: 找到0的位置,把0出现的数组的其他值夜置为0 需要额外空间方法: 1、定义两个布尔数组标记二维数组中行和列…

vue3 【提效】自动路由(含自定义路由) unplugin-vue-router 实用教程

不再需要为每一个路由编写冗长的 routes 配置啦,新建文件便可自动生成路由! 使用方法 1. 安装 unplugin-vue-router npm i -D unplugin-vue-router2. 修改 vite 配置 vite.config.ts import VueRouter from unplugin-vue-router/viteplugins 中加入 V…

【前端】简易化看板

【前端】简易化看板 项目简介 看板分为三个模块,分别是待办,正在做,已做完三个部分。每个事件采取"卡片"式设计,支持任务间拖拽,删除等操作。 代码 import React, { useState } from react; import { Car…

Ubuntu多显示器设置不同缩放比例

Ubuntu多显示器设置不同缩放比例 设备问题解决方案 设备 笔记本屏幕分辨率为2560 \times 1600,外接显示器的分辨率为3840 \times 2160。 问题 Ubuntu默认的显示器设置中,缩放仅能选择100%,200%,300%,400%。假…

从我邮毕业啦!!!

引言 时间过的好快,转眼间就要从北邮毕业了,距离上一次月度总结又过去了两个月,故作本次总结。 PS: https://github.com/WeiXiao-Hyy/blog整理了后端开发的知识网络,欢迎Star! 毕业🎓 6月1号完成了自己的…

开源模型应用落地-FastAPI-助力模型交互-WebSocket篇(三)

一、前言 使用 FastAPI 可以帮助我们更简单高效地部署 AI 交互业务。FastAPI 提供了快速构建 API 的能力,开发者可以轻松地定义模型需要的输入和输出格式,并编写好相应的业务逻辑。 FastAPI 的异步高性能架构,可以有效支持大量并发的预测请求,为用户提供流畅的交互体验。此外,F…

从零开始:Spring Boot 中使用 Drools 规则引擎的完整指南

规则引擎作用 规则引擎主要用于将业务逻辑从应用程序代码中分离出来,提高系统的灵活性和可维护性。规则引擎通过预定义的规则来处理输入数据并做出相应的决策,从而实现业务逻辑的自动化和动态调整。 例如 门店信息校验:美团点评在门店信息…