Re: Does a foreign key field need a separate index?

Dominique Devienne <[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <CAFCRh-8Ce8o7eDdcrxO7wNV3E8Aw2nK0WYpqtxqp4tgPit2igA@mail.gmail.com>
On Thu, Feb 6, 2020 at 11:08 PM Simon Slavin <[email protected]> wrote:
> On 6 Feb 2020, at 9:23pm, Rael Bauer <[email protected]> wrote:
> > Is a foreign key field automatically indexed, or will it benefit from a separately created index?
> No indexes for either lookup are automatically created.

The shell's .expert command might recommend them. Not sure, haven't tried.
But in general, yes, FKs should be indexed, if are are CASCADE'ing them. --DD

https://sqlite.org/cli.html#expert
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.