Home >Database >Mysql Tutorial >mySQL 延迟 查询主表

mySQL 延迟 查询主表

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 18:01:40884browse

在主外键表存在关系的时候如果加上lazy=true的话,则表明延迟,即只查询主表中的内容,而不查询外键表中的内容。

例:
代码如下:


















一般情况下就是把lazy设为true,而不是false,因为,假如设为false的话,在执行查询主表的同时,相应的子表也会查询,添加了许多无用功。
Statement:
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