On 15 Nov 2026, Apd wrote in <11dc…@apd.eternal-september.org>:
> 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 is how my app handles it. For example, I have a test search now looking for the word "router" at 1 level deep (directly quoted). You do not write the SQL yourself, but it will show it to you: ----- -- Quote depth: posts the full-text MATCH finds are then kept, outside SQL, only if "router" is on a line quoted exactly 1 level deep. -- One copy per post: after this query, outside SQL, rows with the same messageId are cut to one, the open server's copy first. SELECT id, messageId, serverId, groupName, articleNumber, subject, authorName, authorEmail, date, byteCount, lineCount, referencesHeader, parentMessageId, isRead, isStarred, isSaved, isKilled, score, NULL AS bodyText, NULL AS rawHeaders, contentType, hasBodyDownloaded, tagNames, createdAt FROM articles WHERE articles.hasBodyDownloaded = 1 AND articles.rowid IN (SELECT rowid FROM articles_fts WHERE articles_fts MATCH 'bodyText : "router"*') ORDER BY +articles.date DESC; ----- (rewrapped for Usenet) So it tells you what is happening. That is just for folks who want to see it or debugging... the general user sees this: https://shottr.cc/s/PfIj/SCR-20261115-iq9 If you see anything amiss there I would appreciate whatever advice you have.
> 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 looked at some old searches you talked about... pretty sure you are faster -- though the search above is pretty much instant (assuming no other database work is going on).
> 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.
Makes sense. While I want the searches to be fairly fast, I am not seeking to be perfect there -- I also want low memory and relatively low drive usage (though it does have a fair amount of overhead there).
> 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.
My database is over 2M and it takes less than a second. Likely yours would as well. Again, no pissing contest here... mostly curious in case there are places where mine is doing things poorly. If there are searches which take a long time I might post and ask for advice. Most of the ones I have tested, though, are well within my acceptable level.
-- You can't find peace with someone at war with themselves.