Can sqlite load individual tables from separate files?

I heard that SQLite can do this (to avoid synchronization issues in heavy traffic scenarios), is that true? If so, how do I do this with PDO in PHP?

+3
source share
2 answers

Will you look for ATTACH and DETACH sqlite commands? You can invoke them by querying any SQLite PDO object.

Commands allow you to attach a separate database file to the current session. An example is:

$connection->query('ATTACH DATABASE blog_entries.sqlite AS BlogEntries;');

, , (: SELECT * FROM entries), . , (: SELECT * FROM BlogEntries.entries)

: SQLite

+6

( , DSN PDO sqlite: memory:) .

0

Source: https://habr.com/ru/post/1716055/


All Articles