除非你显式的指定lazy="false"禁止 延迟抓取(lazy fetching),否则只有当你真正访问关联关系的时候,才会执行第二条select语句。明显这个是延迟装载的。
基于40个网页-相关网页
延迟抓取的另一个问题就是在获取到请求的数据前要一直打开数据库连接,否则应用就会抛出一个延迟加载异常。
Another issue with lazy fetching is that the database connection has to be retained until all the required data is fetched else the application will throw a lazy loading exception.
除非有一张拥有很多你不需要的字段的遗留表,否则不应该使用这种抓取策略,因为它的延迟属性分组会带来额外的SQL。
Unless you have a legacy table that has many columns you don't need, this fetching strategy usually can't be justified since it involves extra SQL for the lazy property group.
运用Percolator, Google可以在抓取网页文档的同时来对文档进行处理,从而将平均延迟降低为原来的百分之一,平均文档寿命(document age)降低50%。
With Percolator, Google is now able to process documents as they are crawled, reducing the average latency by a factor of 100 and the average age of the document by 50%.
应用推荐