[development] SQLite and Drupal 7
Dmitri Gaskin
dmitrig01 at gmail.com
Wed Feb 4 03:27:49 UTC 2009
On Feb 3, 2009, at 12:36 PM, Luc Stroobant wrote:
> Karoly Negyesi wrote:
>> Hi,
>> In case you do not know, SQLite is a one-file database which Drupal
>> 7 supports.
>> One thing we can do, and this is easy, to ship with Drupal install in
>> a read-only SQLite database, say, in the Drupal root. This would
>> allow
>> install.php to become much cleaner and also make install profiles
>> pretty much regular modules with an access to the whole Drupal
>> system.
>> This will make Drupal require SQLite, but I ran a poll, I ran a
>> challenge and seemingly every site that has PHP 5.2 and PDO has
>> SQLite
>> as well.
>
> I don't think it's a good idea to add such a requirement for
> something you only use at install time.
>
>> Now, there is more. We could SQLite as a sort of SQL cache. We could
>> put the following tables into SQLite:
>> a) system
>> b) registry*
>> c) menu_router
>> d) variables
>> e) some cache tables (caution: SQLite is not that good at concurrent
>> writing. It works but only up to a certain point as it locks the
>> whole
>> database.)
>> f) any other table that's read often and written not-so-often.
>> The first two needs some security hardening but that's ongoing.
>> The advantages are somewhat clear: very very early we have access to
>> these things, in a standard, smooth SQL accessible way. On, say,
>> registry rebuild or module enable, DBTNG could easily copy the
>> relevant table from MySQL.
>> There is a disadvantage, however on every site that uses multiple
>> webfrontends against the same MySQL database. There are two kinds of
>> these, high performance sites and development sites.
> <snip>
>
> I've been managing a few Drupal enterprise sites and this sounds
> like a nightmare to me. People who have a dedicated database server
> and an highly optimized setup don't want to add extra overhead and
> make things more complicated with a database in a file. You won't
> find sqlite support in properly configured servers for high
> performance sites.
I think this functionality may be disabled, but for most it's a
performance boost.
>
>
> And another example: in Debian PHP5 doesn't have sqlite support by
> default while it has pdo (you have to install a separate package for
> sqlite support). So I don't think it's that safe to say that
> everybody with pdo support also has sqlite...
>
> Luc
More information about the development
mailing list