"Brannon King" <[EMAIL PROTECTED]> wrote:
> Suppose I have a table with 6 INTEGER columns, and 600k entries. I need =
> to
> create a unique index on three of those columns, ie., CREATE UNIQUE =
> INDEX
> loc ON data (x,y,z). That takes a while so I thought I'd show some =
> progress.
> >From that information, is it possible to calculate the number of opcodes
> such an operation would require for completion so that I could get an
> accurate progress bar? Is there a query that would tell me how many =
> opcodes
> it would take? Is it possible to create the index once and count the =
> number
> of opcodes and do they grow linearly in the creation of indexes?
> 

The number of opcodes to create the index will be

     A + Bn

Where n is the number of entries in the table and A and B
are constants.  The A and B constants will depend on the
structure of your table, and the version of SQLite you
are using.  A and B must be determined experimentally.

If the uniqueness constraint fails, the index creation
will abort immediately and so the total number of opcodes
will be less than predicted.
--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to