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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:57:16+00:00 2026-06-18T04:57:16+00:00

I built sqlite3 from source to include the FTS3 support and then created a

  • 0

I built sqlite3 from source to include the FTS3 support and then created a new table in an existing sqlite database containing 1.5million rows of data, using

CREATE VIRTUAL TABLE data USING FTS3(codes text);

Then used

INSERT INTO data(codes) SELECT originalcodes FROM original_data;

Then queried each table with

SELECT * FROM original_data WHERE originalcodes='RH12';

This comes back instantly as I have an index on that column

The query on the FTS3 table

SELECT * FROM data WHERE codes='RH12';

Takes almost 28 seconds

Can someone help explain what I have done wrong as I expected this to be significantly quicker

  • 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-18T04:57:17+00:00Added an answer on June 18, 2026 at 4:57 am

    The documentation explains:

    FTS tables can be queried efficiently using SELECT statements of two different forms:

    • Query by rowid. If the WHERE clause of the SELECT statement contains a sub-clause of the form “rowid = ?”, where ? is an SQL expression, FTS is able to retrieve the requested row directly using the equivalent of an SQLite INTEGER PRIMARY KEY index.
    • Full-text query. If the WHERE clause of the SELECT statement contains a sub-clause of the form ” MATCH ?”, FTS is able to use the built-in full-text index to restrict the search to those documents that match the full-text query string specified as the right-hand operand of the MATCH clause.

    If neither of these two query strategies can be used, all queries on FTS tables are implemented using a linear scan of the entire table.

    For an efficient query, you should use

    SELECT * FROM data WHERE codes MATCH 'RH12'
    

    but this will find all records that contain the search string.

    To do ‘normal’ queries efficiently, you have to keep a copy of the data in a normal table.
    (If you want to save space, you can use a contentless or external content table.)

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

Sidebar

Related Questions

I'm interested in getting the SQLite database containing browsing history from the built in
I've built an Entity Framework Model from a simple SQLite database using the 'Entity
I have a project built in Python 2.7, using SQLite3 as the database. I
I have built a couple of dlls from source. They are mainly from the
I've got an library which must read data from sqlite database by calling extern
I'm trying to build System.Data.SQLite in Visual Studio using the source code downloaded from
I'm populating my tableview from an array. And this array is created by SQLite
I am using pythons built-in sqlite3 module to access a database. My query executes
i´m trying to write a little script for writting a sqlite table from an
I first retrieve information from the SQLite database into a cursor. The cursor contains

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.