What is Lazy Loading?

前端 未结 13 1345
栀梦
栀梦 2020-11-29 16:46

What is Lazy Loading?

[Edit after reading a few answers] Why do people use this term so often?

Say you just use a ASP/ADO recordset and load it with data or

13条回答
  •  既然无缘
    2020-11-29 17:10

    Lazy loading is a term frequently used in databases to refer to the concept of loading parts of the required info only when it's needed.

    I.e. suppose you needed to have a record which has a join of several tables. If you fetched it all at once it would take longer than if you would fetch say only the main table. Using lazy-loading the rest of the information will be fetched only if it is needed. So it is actually 'efficient-loading' in certain scenarios.

    The other types of 'loading' is:

    1. Eager Loading - Loading all the connected tables at once.

提交回复
热议问题