Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8461427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:52:38+00:00 2026-06-10T13:52:38+00:00

I was reading Django Book and came across interesting statement. Notice that Django doesn’t

  • 0

I was reading Django Book and came across interesting statement.

Notice that Django doesn’t use SELECT * when looking up data and instead lists
 all fields explicitly. This is by design:
 in certain circumstances SELECT * can be slower,

I got this from http://www.djangobook.com/en/1.0/chapter05/

So my question is can someone explain me why SELECT * can be slower, than call every single column explicitly. Would be good if you can give me some examples.
Or if you think the opposite (it doesn’t matter), can you explain why?

Update:

That’s the table :

BEGIN;
CREATE TABLE "books_publisher" (
    "id" serial NOT NULL PRIMARY KEY,
    "name" varchar(30) NOT NULL,
    "address" varchar(50) NOT NULL,
    "city" varchar(60) NOT NULL,
    "state_province" varchar(30) NOT NULL,
    "country" varchar(50) NOT NULL,
    "website" varchar(200) NOT NULL
);

And that’s how Django will call SELECT * FROM book_publisher:

SELECT
    id, name, address, city, state_province, country, website
FROM book_publisher;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:52:39+00:00Added an answer on June 10, 2026 at 1:52 pm
    1. performance (will matter only if you are selecting less columns than there are in the table
    2. I am not sure about how Django works; but in some languages/ db drivers “select *” will cause an error if you change the table schema (say add a new column). This is because the DB driver “caches” the table schema and now its internal schema does not match the table schema.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

while reading up djangobook chapter ,I came across the section which mentions a csrf
Reading about Django, I saw this: http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#ref-contrib-admin - the fancy simple to use admin
surfing on the web, reading about django dev best practices points to use pickled
I'm currently reading the django book and their instructions aren't working for me. People
The book I've been reading about Django mandates heavy usage of a command line
I was reading about Django's support for custom user profiles. I understand that if
I'm reading the Django EmailMessage doc and it doesn't mention the CC field. What
I am working through the examples in a Django book that I have, but
I'm a django beginner and am reading Practical django Projects. The book instructs to
I have a django form that first validates its data through calling form.is_valid(). If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.