Courseiva
Database AccessmediumMultiple ChoiceObjective-mapped

PCPP2 Database Access Practice Question

In SQLAlchemy, what is the difference between 'lazy='select'' and 'lazy='joined'' loading strategies?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

select loading executes a separate SQL statement when the attribute is first accessed.

joined loading performs an outer join to fetch related objects in the same query, whereas select loading fetches them only when accessed.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • joined loading causes N+1 query problems.

    Why it's wrong here

    Joined loading specifically avoids N+1 problems.

  • select loading executes a separate SQL statement when the attribute is first accessed.

    Why this is correct

    Lazy loading (select) emits a new query on access.

  • joined loading is always faster.

    Why it's wrong here

    Performance depends on the data set size and schema.

  • select loading is the default for all relationships.

    Why it's wrong here

    The default is often 'select', but it is configurable.

About these practice questions

Courseiva writes every PCPP2 question from scratch — 194 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Python Institute exam blueprint

This PCPP2 practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCPP2 exam.