Home > Backend Development > PHP Tutorial > mysql数据库join优化

mysql数据库join优化

WBOY
Release: 2016-06-06 20:07:56
Original
957 people have browsed it

表1

goodscategory_id
goodscategory_name

表2
goods_id
goods_cid
goods_name

通过join语句goods_cid和goodscategory_id 相关联

除了该方法联表还有其他的方案吗?join感觉好慢

回复内容:

表1

goodscategory_id
goodscategory_name

表2
goods_id
goods_cid
goods_name

通过join语句goods_cid和goodscategory_id 相关联

除了该方法联表还有其他的方案吗?join感觉好慢

通过索引单表取出数据,在程序中进行join操作。join子查询都是mysql的硬伤

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template