On Mon, Jun 13, 2011 at 8:46 AM, Richard Hipp <d...@sqlite.org> wrote:
> That depends on what fraction of entries have isOnline=1.  If isOnline is
> rare, then an index might be helpful.  But if roughly have the entires have

I wondered about that.

> It seems to me, though, that you are committing the classic error of
> premature optimization.  Don't worry about indices at this point.  Get you
> application running first.  You can create and drop indices later, while the
> application is live, to see what effect, if any, indices have on
> performance.

If the application is not running then indexes make little sense.
However, I have seen far too many databases going to production
without any of the required indexes.  Initially the database runs well
but gets progressively slower as data is added.  The speed reduction
is often not noticed as it occurs over time.  At some point you reach
a data level where you start seeing application errors because the
queries are so slow.

A lot of application developers do not seem to understand indexes and
never add any.  Given some thought about how the application uses
data, most of the indexes could be thought of before it hits
production where you require change requests and testing cycles to add
indexes.

Regardless, indexes interest me because I have had to add them to
production databases so often in the past ...

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

Reply via email to