On 2026-11-15, Apd <n…@all.invalid> wrote:
> On 14/11/2026 23:42, Brock McNuggets wrote:
>> On 14 Nov 2026, Apd wrote:
>>> Perhaps a query for a given date span using the above fields.
>>
>> Any suggestions for a search? Maybe some word in the original text
>> (non-quoted) and then another word in 1-2 levels deep but not in
>> original... and then maybe some range of lines? Just pulling
>> something out of my rear. Open to whatever.
>
> What can be queried depends on the DB. In those SC and I have been
> working on, there are no multiple levels of text stored as columns (only
> original and quoted). Extra parsing would have to be done outside an SQL
> query once the whole article body had been retrieved; similarly for line
> selection. That post-processing isn't being done. I imagine your app is
> having to do this (check your DB schema). IOW, our speed of searches is
> only dependant on the SQLite library which DB Browser and Python use,
> with minimal overhead when using an HTML interface.
>
> I take it you're using an SQLite DB so your best bet would be to test
> your queries from the CLI or install DB Browser (for the benefit of a
> GUI) and load your own DB. Then you can get a realistic comparison
> between your app and the native speed of SQLite.
Exactly. As there isn't much overhead with Python/Flask there's no
benefit to his comparison with my Flask app. Unless one is pulling like
10,000 rows or more (why do *that*?!), on a modern computer they're not
likely to see much of a difference (I'm still amazed at how fast modern
browser are!).
> For the record, a query for my own posts with MID and timestamp,
> containing the string "sqlite" and ordered by date/time takes under a
> second on a db containing over 271000 articles.
For that (via FTS w/Porter's algo), I got a first run of:
Result: 55 rows returned in 99ms
Second run (which is cached): https://i.postimg.cc/4JRR7W5Y/second-run.jpg
And the query returns these items:
header, message id, date, subject, name, body and original text.
(I have over 275.000 posts in the db this query was run in)