SQLite Forum

Reporting performance issue
Login
Dan and Keith, 

We appreciate your feedback! Based on the comments above, we applied a filter to remove duplicated cases where "IS NULL" or "EXISTS (" caused the slowdown. Now we have a few queries. 

For example, this query runs x300 slower than other DBMSs. It would be great if you can confirm this one as another unique class so that we can add this pattern to our testing machine. 


```sql
select ref_1.o_w_id as c0
from main.customer as ref_0
  inner join main.orders as ref_1
    on (ref_0.c_credit_lim is not NULL)
  inner join main.warehouse as ref_2
    on (ref_0.c_street_2 = ref_2.w_street_1 )
where (ref_0.c_delivery_cnt is not NULL) 
  and (ref_1.o_entry_d is not NULL);
```

* Query files link:

```sh
$ wget https://gts3.org/~jjung/report2/sq.tar.gz
```

* Execution result (execution time (second))

| Filename | Postgres |   Mysql  | Cockroachdb |  Sqlite  |   Ratio  | QuerySize |
|---------:|---------:|---------:|------------:|---------:|---------:|---------:|
|    22620 |  0.03366 |    0.026 |     0.00765 |      5.0 |   653.18 |     1319 |
|     9681 |  0.00792 |    0.031 |     0.05196 |      5.0 |   631.14 |      484 |
|    19401 |  0.02936 |    0.085 |     0.10491 |      5.0 |   170.28 |      475 |
|    12652 |  0.01508 |    0.042 |     0.04319 |      5.0 |   331.54 |      307 |
|    24172 |  0.00291 |    0.015 |     0.33168 |    2.223 |   763.38 |      704 |