On Thu, Aug 19, 2010 at 06:46:07PM -0400, Jim Wilcoxson scratched on the wall:
> On 8/19/10, Simon Slavin <slav...@bigfraud.org> wrote:
> >
> > On 19 Aug 2010, at 9:27pm, Taras Glek wrote:
> >
> >> I really appreciate that sqlite got this feature to reduce
> >> fragmentation, but why not expose this as a pragma?
> >
> > Do you have figures which suggest that reducing fragmentation leads to any
> > improvement in performance ?
> 
> Whether SQLITE_FCNTL_CHUNKS_SIZE is useful is a different discussion.
> I myself would love to see features exposed via pragmas whenever
> possible, for the simple reason that I don't use the C API and can't
> make use of the features otherwise.  I would assume that since the
> SQLite developers added the feature to the C API, there must be a use
> for it or they wouldn't have bothered.

  From discussions in the past, I've gotten the feeling that the SQLite
  team considers the C API and the SQL interfaces (including PRAGMA
  commands) to have different security requirements.  This is why you
  need to make an API call to enable extension loading-- because it is
  viewed as something "dangerous" you can do from the SQL level. 
  Similarly, this is why there is no SQL PRAGMA interface to such
  functions as sqlite3_limit().

  Personally, I've found very few situations where a user might have
  access to an SQL prompt when they would not have access to database
  file (e.g. they can run sqlite3 or their own program and do whatever
  they want), but I suppose this may be true in some web environments
  or some scripting environments.

  Given how easy it is to build SQL wrappers in an extension (or
  built-in code), I don't see it as a major issue.  One of the "how
  to write a custom SQL function" examples in "Using SQLite" builds a
  wrapper around sqlite3_limit().  I know people that are not using the
  C interface are faced with additional challenges when it comes to
  loading extensions or modifying the core SQLite library, but if it is
  that important, it can usually be done.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to