Home > Backend Development > PHP Tutorial > mysql执行多表查询,大数据,sql该如何写

mysql执行多表查询,大数据,sql该如何写

WBOY
Release: 2016-06-13 11:40:31
Original
1237 people have browsed it

mysql执行多表查询,大数据,sql该怎么写。
假设两个表   A  B。两个表结构相同。现在要取出A表的所有字段和B表的set,rutime字段。两个表的ID相同。   

因为数据量比较大,两个表在100w左右,之后还可能会有多个这样大的表。
我在phpmyadmin中拿

select * from A as a,B as b where a.haoma = b.haoma

测试的时候就已经跑死掉了。哪位大虾帮助写一下这个sql

Related labels:
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