On 2016/04/15 11:53 PM, Simon Slavin wrote:

I'm with Simon in response to Cecil on the idea of adding a shortlist of 
known "bite" possibilities, something like the whentouse.html or the 
howtocorrupt.html.  Perhaps named commonmistakes.html or the like.  
Maybe we could ask for contributions here and task someone with 
compiling the draft so this does not fall on the devs alone. Use the 
community for some good.

> The problems most commonly mentioned here seem to be (in no particular order)
>
> * SQLite datatypes and how SQLite decides which datatype you want
> * SQLite uses affinities not column types
> * thinking you should index each column instead of indexes for queries
> * consequences of various PRAGMAs which might appear to speed SQLite up
> * consequences of the two different journal types (including file size)

Yes - I would add "File-locking pitfalls and using time-outs" and 
"When/How to use ANALYZE and VACUUM" and perhaps "Floating-Point 
comparison caveats".

> * compilation errors/warnings in various tools/environments
> * when you need the component source files not just the amalgamation
> * problems using Windows DLL in some environments/versions
> * problems not in SQLite but introduced by various SQLite shells/libraries 
> when trying to bridge the gaps between SQLite and the way their language or 
> data structure works (e.g. pretending that SQLite has a date/time type)

Yes - though this section should probably remain as light as possible, 
referring any serious delving into the API to the appropriate existing 
documentation.

> The most common mistake which leads to posts to this list is -- still the 
> winnah after five years ! -- premature optimization.  I can't believe how 
> much coding time and software complication is wasted by people who spend 
> hours on multi-thread, queueing and partitioning code instead of redesigning 
> their schema or thinking through how indexes work.
Too true. I often try to avoid being one of the "prem-optimization 
police" since on many forums it has become an eager troll-snipe to shout 
"premature" at unsuspecting passers-by, but the fact is it still crops 
up unbelievably much, and it remains evil.

Everybody here is a little OCD and wants to bask in that warm feeling 
that fills you with the purest of joy when you "just know" you have 
pruned another fifteen cpu cycles out of your already-lean design...  
It's not like we don't "get" it, but geez, a baby kitten doesn't drown 
every time you use the "normal" good-enough way. Let it be!


Cheers,
Ryan

Reply via email to