It's exhaustive in that it absolutely verifies if the key exists or not.  
However, it doesn't necessarily do a full database scan.  I assume it uses 
available indexes and does a standard lookup on the key.

So, it still might be fast enough for what you want (though I missed the 
beginning of the thread).

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Richard Hipp
Sent: Friday, May 24, 2013 9:40 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Is pragma foreign_key_check fast enough to be used in 
normal application flow?

On Fri, May 24, 2013 at 7:07 AM, kyan <alfasud...@gmail.com> wrote:

>
> So my question is, is [the foreign_key_check] pragma exhaustive or is 
> it somehow optimised so that it does not always perform a full 
> database scan -e.g. by means of some internal per-transaction FK 
> violation counter or list? Because if it is optimised and thus fast 
> enough then I suppose I can try to use it for the purpose I have 
> described.
>


It is exhaustive


--
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


This email and any attachments are only for use by the intended recipient(s) 
and may contain legally privileged, confidential, proprietary or otherwise 
private information. Any unauthorized use, reproduction, dissemination, 
distribution or other disclosure of the contents of this e-mail or its 
attachments is strictly prohibited. If you have received this email in error, 
please notify the sender immediately and delete the original.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to