Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Remember Darwin; building a better mousetrap merely results in smarter mice.


devel / comp.lang.clipper.visual-objects / bBrowser row count for specific condition

SubjectAuthor
* bBrowser row count for specific conditionGrzegorz R.
`* Re: bBrowser row count for specific conditiondlzc
 `* Re: bBrowser row count for specific conditionGrzegorz R.
  `- Re: bBrowser row count for specific conditiondlzc

1
bBrowser row count for specific condition

<43236850-7750-446e-b4f8-55514e90f3edn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=799&group=comp.lang.clipper.visual-objects#799

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a05:6214:15c2:: with SMTP id p2mr6605344qvz.11.1620334451631;
Thu, 06 May 2021 13:54:11 -0700 (PDT)
X-Received: by 2002:a05:620a:24c5:: with SMTP id m5mr6031074qkn.195.1620334451377;
Thu, 06 May 2021 13:54:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Thu, 6 May 2021 13:54:11 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=83.6.159.134; posting-account=D5fG0goAAADqRXT4F2tZQt5KfDZfW15T
NNTP-Posting-Host: 83.6.159.134
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <43236850-7750-446e-b4f8-55514e90f3edn@googlegroups.com>
Subject: bBrowser row count for specific condition
From: ramotny64@gmail.com (Grzegorz R.)
Injection-Date: Thu, 06 May 2021 20:54:11 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Grzegorz R. - Thu, 6 May 2021 20:54 UTC

Hello all,
I have child DBserver filtered with SetSelectiveRelation and bound to bBrowser.
I would like to quicklu get count of all recs where one column (field) is not empty. Like CheckColumn:CheckedCount bot not logical column/field - in this case it's date field.
I could do it with while-skip loop (either at DBserver or bBrowser) but I'm afraid it will be slow and I think that lowlevel :CheckedCount is much faster and does not require moving bound server.
I have created virtual column containing logical value (empty/not empty) but Virtualcolumn does not have :CheckedCount method even if contains logical values.
I could also add new field to database with logical flag empty/notempty and bind CheckColumn but it just would in some way "duplicate" info that is already in DB (although in another form).
Is there any way to count rows that meet a certain coniditon in specific column without moving dbserver pointer?
Kind regards
Gregory

Re: bBrowser row count for specific condition

<67ab281b-b66c-412a-8fd9-bb0fabc2b282n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=800&group=comp.lang.clipper.visual-objects#800

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a05:6214:432:: with SMTP id a18mr5173635qvy.52.1620395082708;
Fri, 07 May 2021 06:44:42 -0700 (PDT)
X-Received: by 2002:ac8:7d93:: with SMTP id c19mr9385917qtd.306.1620395082526;
Fri, 07 May 2021 06:44:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Fri, 7 May 2021 06:44:42 -0700 (PDT)
In-Reply-To: <43236850-7750-446e-b4f8-55514e90f3edn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=68.107.209.13; posting-account=7bF0GwoAAABMFHX6V4fON4-1F6LFJ834
NNTP-Posting-Host: 68.107.209.13
References: <43236850-7750-446e-b4f8-55514e90f3edn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <67ab281b-b66c-412a-8fd9-bb0fabc2b282n@googlegroups.com>
Subject: Re: bBrowser row count for specific condition
From: dlzc1@cox.net (dlzc)
Injection-Date: Fri, 07 May 2021 13:44:42 +0000
Content-Type: text/plain; charset="UTF-8"
 by: dlzc - Fri, 7 May 2021 13:44 UTC

Dear ramo...:

On Thursday, May 6, 2021 at 1:54:12 PM UTC-7, ramo...@gmail.com wrote:
....
> Is there any way to count rows that meet a certain coniditon
> in specific column without moving dbserver pointer?

Can you create an index on that date field, set ".not. empty()" as one of the conditions, and get a count of indexed items? If it is a "permanent" index, then you should have less performance penalty.

I don't do VO, so I cannot help beyond that. Something like:
https://harbour.github.io/doc/rddads.html#adskeycount

David A. Smith

Re: bBrowser row count for specific condition

<8ff46a9d-704d-4320-a83c-b29d877620ffn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=801&group=comp.lang.clipper.visual-objects#801

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a05:620a:cf6:: with SMTP id c22mr22495206qkj.123.1620650394681; Mon, 10 May 2021 05:39:54 -0700 (PDT)
X-Received: by 2002:a0c:f586:: with SMTP id k6mr23731506qvm.8.1620650394525; Mon, 10 May 2021 05:39:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Mon, 10 May 2021 05:39:54 -0700 (PDT)
In-Reply-To: <67ab281b-b66c-412a-8fd9-bb0fabc2b282n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=79.190.238.18; posting-account=D5fG0goAAADqRXT4F2tZQt5KfDZfW15T
NNTP-Posting-Host: 79.190.238.18
References: <43236850-7750-446e-b4f8-55514e90f3edn@googlegroups.com> <67ab281b-b66c-412a-8fd9-bb0fabc2b282n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8ff46a9d-704d-4320-a83c-b29d877620ffn@googlegroups.com>
Subject: Re: bBrowser row count for specific condition
From: ramotny64@gmail.com (Grzegorz R.)
Injection-Date: Mon, 10 May 2021 12:39:54 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 24
 by: Grzegorz R. - Mon, 10 May 2021 12:39 UTC

piątek, 7 maja 2021 o 15:44:43 UTC+2 dlzc napisał(a):
> Dear ramo...:
>
> On Thursday, May 6, 2021 at 1:54:12 PM UTC-7, ramo...@gmail.com wrote:
> ...
> > Is there any way to count rows that meet a certain coniditon
> > in specific column without moving dbserver pointer?
> Can you create an index on that date field, set ".not. empty()" as one of the conditions, and get a count of indexed items? If it is a "permanent" index, then you should have less performance penalty.
>
> I don't do VO, so I cannot help beyond that. Something like:
> https://harbour.github.io/doc/rddads.html#adskeycount
>
> David A. Smith

Hello David

thank You for suggestion but a) I can make index FOR (condition) but it does not tell how many elements have been indexed (at least I do not know how to get it) and b) I do not use Harbour ADS so do not have any advanced functions&methods.

Anyway - thank You
Gregory

Re: bBrowser row count for specific condition

<eccd4cdd-428b-4e11-a35d-614bead85e44n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=803&group=comp.lang.clipper.visual-objects#803

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:ac8:6044:: with SMTP id k4mr22881650qtm.374.1620655724906;
Mon, 10 May 2021 07:08:44 -0700 (PDT)
X-Received: by 2002:a37:a6c6:: with SMTP id p189mr23022495qke.161.1620655724724;
Mon, 10 May 2021 07:08:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Mon, 10 May 2021 07:08:44 -0700 (PDT)
In-Reply-To: <8ff46a9d-704d-4320-a83c-b29d877620ffn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=68.107.209.13; posting-account=7bF0GwoAAABMFHX6V4fON4-1F6LFJ834
NNTP-Posting-Host: 68.107.209.13
References: <43236850-7750-446e-b4f8-55514e90f3edn@googlegroups.com>
<67ab281b-b66c-412a-8fd9-bb0fabc2b282n@googlegroups.com> <8ff46a9d-704d-4320-a83c-b29d877620ffn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eccd4cdd-428b-4e11-a35d-614bead85e44n@googlegroups.com>
Subject: Re: bBrowser row count for specific condition
From: dlzc1@cox.net (dlzc)
Injection-Date: Mon, 10 May 2021 14:08:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: dlzc - Mon, 10 May 2021 14:08 UTC

Dear ramo...:

On Monday, May 10, 2021 at 5:39:55 AM UTC-7, ramo...@gmail.com wrote:
> piątek, 7 maja 2021 o 15:44:43 UTC+2 dlzc napisał(a):
> > On Thursday, May 6, 2021 at 1:54:12 PM UTC-7, ramo...@gmail.com wrote:
> > ...
> > > Is there any way to count rows that meet a certain coniditon
> > > in specific column without moving dbserver pointer?
> > Can you create an index on that date field, set ".not. empty()"
> > as one of the conditions, and get a count of indexed items?
> > If it is a "permanent" index, then you should have less
> > performance penalty.
> >
> > I don't do VO, so I cannot help beyond that. Something like:
> > https://harbour.github.io/doc/rddads.html#adskeycount
>
> thank You for suggestion but a) I can make index FOR
> (condition) but it does not tell how many elements have
> been indexed (at least I do not know how to get it)

That was my hope, that VO had tools similar to those for ADS (not a part of (x)Harbour... a sort of SQL alternative).

The type of index used, the number of keys is stored in the index file:
https://www.clicketyclick.dk/databases/xbase/format/cdx.html#CDX_STRUCT
.... not saying you use CDX files.

> and b) I do not use Harbour ADS so do not have any
> advanced functions&methods.

I was not trying to convert you. Just trying to get you 'out of the corner'. I hope someone chimes in with a way to accomplish your need. I'll shut up now.

David A. Smith

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor