Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

配置分页后查询效率巨低 #792

Open
rationalol opened this issue Jan 9, 2025 · 1 comment
Open

配置分页后查询效率巨低 #792

rationalol opened this issue Jan 9, 2025 · 1 comment

Comments

@rationalol
Copy link

rationalol commented Jan 9, 2025

Description

环境win11
jdk20
APIJSON7
MYSQL 5.7
原图
0 2s
3s

在日志中打印出的SQL语句如下

SELECT
	* 
FROM
	(
	SELECT
		`Call_record`.*,
		`Sale_customer`.`phone_number` AS `contract_number`,
		`Sale_customer`.`company_name`,
		`Sale_customer`.`rank`,
		`Sale_customer`.`notice`,
		`Sale_customer`.`region`,
		`Temp_salesperson`.`created_at` AS `join_date`,
		`Temp_salesperson`.`name`,
		`Temp_salesperson`.`team` 
	FROM
		`herui`.`Call_record` AS `Call_record`
		INNER JOIN `herui`.`Sale_customer` AS `Sale_customer` ON `Sale_customer`.`phone_number` = `Call_record`.`phone_number`
		INNER JOIN `herui`.`Temp_salesperson` AS `Temp_salesperson` ON `Temp_salesperson`.`salesperson_id` = `Call_record`.`operator_id` 
	) AS `Call_record` 
	LIMIT 20

执行时间是0.187s

@rationalol
Copy link
Author

@TommyLemon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant