On 31 May 2018, at 8:59pm, Andrew Stewart <astew...@arguscontrols.com> wrote:

>                I have a database that is populated with data (and more being 
> added) and I have realized that I need an extra index to speed up access.  
> How long should it take to update the Index.  There are about 1billion rows 
> in the database

Depends on what data is in the columns you're indexing.  Fixed-length numeric 
data can be fast.  Variable-length text of BLOB data can take longer.  But it 
depends more on the medium the database is stored on.  If that database is 
stored on (actual spinning rust) hard drives, the limiting speed is how fast 
the drive is turning, and SQLite will be spending most of its time waiting for 
data-exchange with the hard disk.

Could be an hour.  Could be ten hours or more.  Whichever it is, I would 
declare "down for maintenance" and do it overnight or on a weekend.

Do think carefully about the index you're making.  Does it satisfy a particular 
WHERE clause, with or without an ORDER BY ?  Would it be better to make it a 
covering index ?

Make sure that either you're working on a copy or have taken a backup, of 
course.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to