>From: D. Richard Hipp [mailto:[EMAIL PROTECTED]
>
-- snip --
>simplifies to O(logN) which is clearly less than O(N).
>In that case, it pays to use the index.
Which is my case I believe, thanks. It's been years (OMG, 16!) since I
had an algorithms class. Is that log base 2, or does it
At 5:05 PM -0700 6/21/04, Keith Herold wrote:
> down the result set would make things faster..? Wouldn't the select
here:
CREATE TABLE tmp ( flag boolean, name text );
SELECT name FROM tmp WHERE flag = 1 AND name LIKE '%foo%';
run faster with an index on the flag column since it can
> On Jun 20, 2004, at 9:07 PM, Darren Duncan wrote:
> down the result set would make things faster..? Wouldn't the select
> here:
>
>CREATE TABLE tmp ( flag boolean, name text );
>
>SELECT name FROM tmp WHERE flag = 1 AND name LIKE '%foo%';
>
> run faster with an index on the flag
On Jun 20, 2004, at 9:07 PM, Darren Duncan wrote:
Generally speaking, you should only use indexes on table columns that
have a lot of distinct values, and each one only appears a few times.
You should not use indexes on columns that have few distinct values
and each appears many times; in the
Something else I should mention is in regard to good design
decisions. This information may actually be more helpful to you.
With any given database engine, there are good times to use indexes
and bad times, as far as speed and space optimization goes.
Generally speaking, you should only use
>
>
>
>No indexes: 21 sec.
>Indexing while inserting: 50 sec.
>Indexing after inserting: 37 sec.
>
You're right; creating the index after inserting is faster. Indeed, I
tried that out. With a larger set of data the gap is even more
dramatic.
More benchmarks, taken from the same data dumped
Hello,
your best bet is to first declare the database without indexes, then
load all the data, then add the indexes afterwards.
Indeed.
Just for the kicks, I've tested with 100K records. These are the
results:
No indexes: 21 sec.
Indexing while inserting: 50 sec.
Indexing after inserting: 37
I know the insert into an indexed table performance has been discussed
here before, but I wanted to add to it and ask some questions.
I'm benchmarking loading insert statements, dumped from a 3.7GB file,
into an empty database with sqlite.exe:
BEGIN TRANSACTION;
CREATE TABLE Articles(RID integer
8 matches
Mail list logo