Re: [sqlite] [EXTERNAL] Slow joining of tables with indexes

2019-12-03 Thread Jonathan Moules
Thanks for the suggestion. Changing the USING to ON makes absolutely no difference. The speed is the same and the query plans (both EXPLAIN and EXPLAIN QUERY PLAN) are absolutely identical. Same for if I convert it to WHERE: WHERE joining_table.data_id = data_table.data_id; On 2019-12-03

Re: [sqlite] [EXTERNAL] Slow joining of tables with indexes

2019-12-03 Thread Simon Slavin
On 3 Dec 2019, at 8:48am, Jonathan Moules wrote: > SELECT > count(1) > FROM > data_table > JOIN joining_table USING (data_id); SELECT count(1) FROM data_table JOIN joining_table ON joining_table.data_id =

Re: [sqlite] [EXTERNAL] Slow joining of tables with indexes

2019-12-03 Thread Jonathan Moules
stats on" to get a little more info, but I'm not sure how much more info it'll provide. -Original Message- From: sqlite-users On Behalf Of Hick Gunter Sent: Tuesday, November 26, 2019 4:57 AM To: 'SQLite mailing list' Subject: Re: [sqlite] [EXTERNAL] Slow joining of tables wi

Re: [sqlite] [EXTERNAL] Slow joining of tables with indexes

2019-12-02 Thread Jonathan Moules
57 AM To: 'SQLite mailing list' Subject: Re: [sqlite] [EXTERNAL] Slow joining of tables with indexes You are using text columns as primary keys and referencing them directly in foreign keys. This is probably not what you want, because it duplicates the text key. Also, with foreign keys enabled,

Re: [sqlite] [EXTERNAL] Slow joining of tables with indexes

2019-11-26 Thread David Raymond
something like ".scanstats on" to get a little more info, but I'm not sure how much more info it'll provide. -Original Message- From: sqlite-users On Behalf Of Hick Gunter Sent: Tuesday, November 26, 2019 4:57 AM To: 'SQLite mailing list' Subject: Re: [sqlite] [EXTERNAL] Sl

Re: [sqlite] [EXTERNAL] Slow joining of tables with indexes

2019-11-26 Thread Hick Gunter
like to read up on those too -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Jonathan Moules Gesendet: Dienstag, 26. November 2019 10:25 An: SQLite mailing list Betreff: [EXTERNAL] [sqlite] Slow joining of tables with indexes