Manage finite SQL resources better #150

닫힘
jking5 년 전을 오픈 · 0개의 코멘트
jking 코멘트됨, 5 년 전
소유자

While we already have problems using too much memory (see #134), an even more significant problem is the finite resources available for constructing complex SQL queries.

There are two such resources to be concerned with: the maximum number of parameter markers, and the maximum length of a query.

The first was already identified as a problem for updating very large feeds (see #71), but as criteria for article selection become more numerous and complex, SQLite's limit of 999 parameters quickly appears small.

One solution is to embed values in IN() clauses and LIKE matches into the query, but this must be balanced against SQLite's 1M-byte query length limit (MySQL and PostgreSQL also have limits, but they are significantly larger). Integers should not be problematic, but strings could hypothetically be quite large.

It would probably be sufficient to embed sets larger than five elements, while still parameterizing strings longer than 255 bytes in embedded sets.

While we already have problems using too much memory (see #134), an even more significant problem is the finite resources available for constructing complex SQL queries. There are two such resources to be concerned with: the maximum number of parameter markers, and the maximum length of a query. The first was already identified as a problem for updating very large feeds (see #71), but as criteria for article selection become more numerous and complex, SQLite's limit of 999 parameters quickly appears small. One solution is to embed values in `IN()` clauses and `LIKE` matches into the query, but this must be balanced against SQLite's 1M-byte query length limit (MySQL and PostgreSQL also have limits, but they are significantly larger). Integers should not be problematic, but strings could hypothetically be quite large. It would probably be sufficient to embed sets larger than five elements, while still parameterizing strings longer than 255 bytes in embedded sets.
jking added the
bug
label 5 년 전
jking 0.7.0 5 년 전 마일스톤을 추가하였습니다.
jking closed this issue 5 년 전
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 1명
알림
마감일

마감일이 설정되지 않았습니다.

의존성

이 이슈는 어떠한 의존성도 가지지 않습니다.

불러오는 중...
아직 콘텐츠가 없습니다.