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 321719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:52:17+00:00 2026-05-12T08:52:17+00:00

On DBD::SQLite of SQLite3 If I am going to query a SELECT only once.

  • 0

On DBD::SQLite of SQLite3

If I am going to query a SELECT only once.

Should I CREATE a INDEX first and then query the SELECT
 or
just query the SELECT without an INDEX,
 which is faster ?

If need to be specified, the col. to be index on is a INTEGER of undef or 1, just these 2 possibilities.

  • 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-05-12T08:52:18+00:00Added an answer on May 12, 2026 at 8:52 am

    Building an index takes longer than just doing a table scan. So, if your single query — which you’re only running once — is just a table scan, adding an index will be slower.

    However, if your single query is not just a table scan, adding the index may be faster. For example, without an index, the database may perform a join as many table scans, once for each joined row. Then the index would probably be faster.

    I’d say to benchmark it, but that sounds silly for a one-off query that you’re only ever going to run once.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am DBD::SQLite to insert some data in SQlite3 db using perl. I have
I am going to be writing to a MySQLite database file, using Perl's DBD:SQLite
I'm using ActiveState Perl 5.8.8. Just used PPM to upgrade DBD::SQLite from 1.08 to
I am using a DBD::SQLite in memory database. I have defined the following indexes
First I wanted to build the DBD::mysql package. That kept failing because whatever make
Hi I am using DBD::Oracle in my script to query into oracle database. When
I have a daemon which loads DBI (DBD::mysql) and then forks child processes. I'd
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db Unable to find any
I have a simple perl script that uses DBD::Oracle to run a query and
I'm using DBD::Oracle in perl, and whenever a connection fails, the client generates a

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.