Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Of all the tyrannies that affect mankind, tyranny in religion is the worst." -- Thomas Paine


devel / comp.lang.clipper.visual-objects / Re: SQLServer VO2.5 x VO2.8

SubjectAuthor
* SQLServer VO2.5 x VO2.8Antonio Falcao Neto
+- Re: SQLServer VO2.5 x VO2.8Jamal
`- Re: SQLServer VO2.5 x VO2.8Wolfgang Riedmann

1
SQLServer VO2.5 x VO2.8

<db88e132-c7e6-4614-975b-17a0a41e0f2fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a05:620a:24c3:: with SMTP id m3mr8399815qkn.301.1636660378758;
Thu, 11 Nov 2021 11:52:58 -0800 (PST)
X-Received: by 2002:a05:622a:4d4:: with SMTP id q20mr10175463qtx.142.1636660378536;
Thu, 11 Nov 2021 11:52:58 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.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: Thu, 11 Nov 2021 11:52:58 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=2804:14d:be88:a1da:9815:8542:f089:ea30;
posting-account=LUtzsAoAAAAiXUxAmgvhx7nd1UZJI4hU
NNTP-Posting-Host: 2804:14d:be88:a1da:9815:8542:f089:ea30
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <db88e132-c7e6-4614-975b-17a0a41e0f2fn@googlegroups.com>
Subject: SQLServer VO2.5 x VO2.8
From: netofalcao.bezerra@gmail.com (Antonio Falcao Neto)
Injection-Date: Thu, 11 Nov 2021 19:52:58 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 37
 by: Antonio Falcao Neto - Thu, 11 Nov 2021 19:52 UTC

Hello,
I have a very old system on VO2.5 on SQLServer.
I am switching to VO2.8. But performance on 2.8 is MUCH SLOWER.
Does anyone have any idea how to improve?
The code below takes 1s on VO25 and 27s on VO28. There are 2500 records

local oConn as SQLConnection
local cCon as string
local cSQL as string
local oSele as SQLSelect
local aVal as array
local cStart as string
cCon:="DRIVER=SQL Server;SERVER=IP;UID=XaXaXaXa;PWD=PoPoPoPo;DATABASE=base"
oConn := SQLConnection{}
oConn:DriverConnect(,SQL_DRIVER_NOPROMPT,cCon)
oConn:SetConnectOption(SQL_AUTOCOMMIT,1)
cSQL:="select obr_uni_numero "+;
"from obra_unidades "+;
"where obr_numero=203 "+;
"order by obr_uni_numero "+;
cStart:=Time()
oSele:=SQLSelect{cSQL,oConn}
if oSele:Execute()

aVal:={}
do while !oSele:EoF
AAdd(aVal,oSele:FIELDGET(#Obr_Uni_Numero))
oSele:Skip()
endd
TextBox{,"",ElapTime(cInicio,Time())+"-"+Str1(Len(aVal))}:Show()

endif
oSele:Close()

Re: SQLServer VO2.5 x VO2.8

<smnn91$2lp$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!aioe.org!usMzckGswq/a27BPojtwGg.user.46.165.242.75.POSTED!not-for-mail
From: nospam@example.com (Jamal)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: SQLServer VO2.5 x VO2.8
Date: Sat, 13 Nov 2021 01:51:13 -0500
Organization: Aioe.org NNTP Server
Message-ID: <smnn91$2lp$1@gioia.aioe.org>
References: <db88e132-c7e6-4614-975b-17a0a41e0f2fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="2745"; posting-host="usMzckGswq/a27BPojtwGg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.1
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Jamal - Sat, 13 Nov 2021 06:51 UTC

Antonio,

What part is slow? Is it in the DO WHILE loop?

You need to profile the FieldGET() and Skip() method and isolate which
is slow.

One option is to speed up the Skip() is by surrounding the DO WHILE loop
with oSele:SuspendNotification() and oSele:ResetNotification() block;
however, I'm not sure about this when dealing with SQL.

Good Luck!
Jamal

On 11/11/2021 2:52 PM, Antonio Falcao Neto wrote:
> Hello,
> I have a very old system on VO2.5 on SQLServer.
> I am switching to VO2.8. But performance on 2.8 is MUCH SLOWER.
> Does anyone have any idea how to improve?
> The code below takes 1s on VO25 and 27s on VO28. There are 2500 records
>
> local oConn as SQLConnection
> local cCon as string
> local cSQL as string
> local oSele as SQLSelect
> local aVal as array
> local cStart as string
>
> cCon:="DRIVER=SQL Server;SERVER=IP;UID=XaXaXaXa;PWD=PoPoPoPo;DATABASE=base"
> oConn := SQLConnection{}
> oConn:DriverConnect(,SQL_DRIVER_NOPROMPT,cCon)
> oConn:SetConnectOption(SQL_AUTOCOMMIT,1)
>
> cSQL:="select obr_uni_numero "+;
> "from obra_unidades "+;
> "where obr_numero=203 "+;
> "order by obr_uni_numero "+;
>
> cStart:=Time()
> oSele:=SQLSelect{cSQL,oConn} > if oSele:Execute()
>
> aVal:={}
> do while !oSele:EoF
> AAdd(aVal,oSele:FIELDGET(#Obr_Uni_Numero))
> oSele:Skip()
> endd
>
> TextBox{,"",ElapTime(cInicio,Time())+"-"+Str1(Len(aVal))}:Show()
>
> endif
>
> oSele:Close()
>

Re: SQLServer VO2.5 x VO2.8

<ivcf4pF1s12U1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: wriedmann@gmail.com (Wolfgang Riedmann)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: SQLServer VO2.5 x VO2.8
Date: Sun, 14 Nov 2021 13:52:41 +0100
Lines: 17
Message-ID: <ivcf4pF1s12U1@mid.individual.net>
References: <db88e132-c7e6-4614-975b-17a0a41e0f2fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-Trace: individual.net VBCVPmRniIrNDoWMpJb96gmwoe/q7wMwati45ccNRNGvwhJDE=
Cancel-Lock: sha1:tx9QMcgHjXH0X15nnIENJYOA/Tw=
User-Agent: XanaNews/1.18.1.6
 by: Wolfgang Riedmann - Sun, 14 Nov 2021 12:52 UTC

Hi Antonio,

> I have a very old system on VO2.5 on SQLServer.
> I am switching to VO2.8. But performance on 2.8 is MUCH SLOWER.
> Does anyone have any idea how to improve?

try to set

SqlSetStmtCursorType( SQL_CURSOR_DYNAMIC )

at the start of your program.

Wolfgang

--

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor