New answers tagged sqlite
There is the litereplica It's exactly an addition to the SQLite3 code. The interface is unchanged so we don't need to change the application code. It's released under the AGPLv3 and there is also a commercial license.
You can simply inherit the primary key from the Animals table in the Fish and Cattle table. This example uses syntax that is SQL Server specific, however you should be able to convert this into SQLLite syntax: CREATE TABLE dbo.Animals ( AnimalID INT NOT NULL CONSTRAINT PK_Animals PRIMARY KEY CLUSTERED , DateCreated DATETIME ); ...
Since the number of distinct job_id is small, you can try this way of writing this type of queries. I've often used in MySQL that doesn't have window functions - and you can't even have a subquery with a IN (SELECT ... LIMIT x). Try this with an index on (job_id, run_number, status): SELECT jr.* FROM ( SELECT DISTINCT job_id FROM job_runs ...
Top 50 recent answers are included