Slow RDD experiences
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: Slow RDD experiences
Antonio,
So if you set to .f. in your function, the program can´t work in network mode?.
I guess that´s what you don´t want, you need to work in a network.
So if you set to .f. in your function, the program can´t work in network mode?.
I guess that´s what you don´t want, you need to work in a network.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Re: Slow RDD experiences
cmxshared(.f.) or dbInfo( DBI_SHARED, .F. ) is used after you open the .dbf so it can be used on the network.
For instance
So the .dbf is opened in shared mode but the index locking for skip, seek, etc will be turned off so those actions work much faster.
The danger arises when there are people updating the index while you perform a skip or seek and the record you end up on may not be valid.
You should use this feature with care. I use it mostly on history data or data that is not changed all the time.
For instance
Code: Select all
use mydbf share via "DBFCDX"
dbInfo( DBI_SHARED, .F. )
set order to 1
skip while .not. eof()
The danger arises when there are people updating the index while you perform a skip or seek and the record you end up on may not be valid.
You should use this feature with care. I use it mostly on history data or data that is not changed all the time.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Slow RDD experiences
Lucas,
Here you have this function docs (it should provide the same functionality):
http://www.ousob.com/ng/cmx/ngfe93.php
Here you have this function docs (it should provide the same functionality):
http://www.ousob.com/ng/cmx/ngfe93.php
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Re: Slow RDD experiences
1. What RDD were you using ?
DBFCDX
2. An upgrade of Harbour (or xHarbour) solved it ?
NO
3. Was it related to a certain Windows version ?
NO
4 Was it related to the network ?
NO
5. How did you fixed it ?
No fix
Bye
DBFCDX
2. An upgrade of Harbour (or xHarbour) solved it ?
NO
3. Was it related to a certain Windows version ?
NO
4 Was it related to the network ?
NO
5. How did you fixed it ?
No fix
Bye
Marco Boschi
info@marcoboschi.it
info@marcoboschi.it
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Slow RDD experiences
Marco,
EMG
Are you saying that you experienced the slowness even with a local (no network) application???MarcoBoschi wrote:4 Was it related to the network ?
NO
EMG
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Re: Slow RDD experiences
Beg your pardon,
I intend that in different scenarios the problem of slowness is the same
Microsoft, Linu, Novell, etc. etc.
I intend that in different scenarios the problem of slowness is the same
Microsoft, Linu, Novell, etc. etc.
Marco Boschi
info@marcoboschi.it
info@marcoboschi.it
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Slow RDD experiences
Marco,
have you ever tried dbInfo( DBI_SHARED, .F. ) ? Just in the cases where you are reading data.
Docs are above.
have you ever tried dbInfo( DBI_SHARED, .F. ) ? Just in the cases where you are reading data.
Docs are above.
Re: Slow RDD experiences
The dbf are used by both applications Fivewin and ,Net and the .Net provider doesn't handle well the FOR !Deleted() clause.James Bott wrote:Patrizio,
Why can't you?The slow performance are due to deleted records but we can't use the INDEX ... FOR !Deleted()
James
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Re: Slow RDD experiences
Antonio,
this test is OK?
this test is OK?
Code: Select all
#include "dbinfo.ch"
ANNOUNCE RDDSYS
FUNCTION MAIN
LOCAL nInizio := SECONDS()
SET EXCLUSIVE OFF
USE aala
SET INDEX TO AALA
dbInfo( DBI_SHARED, .F. )
SET ORDER TO 1
DO WHILE !EOF()
// ? field->bol_lav , field->rag_cli
SKIP
ENDDO
? SECONDS() - nInizio
INIT PROCEDURE RddInit
REQUEST DBFFPT
REQUEST DBFCDX
rddSetDefault( "DBFCDX" )
RETURN
Marco Boschi
info@marcoboschi.it
info@marcoboschi.it
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Slow RDD experiences
Patrizio,
James
I would suggest reusing deleted records. Whenever you want to add a new record, first look for a deleted record and if found, use it, otherwise add a new record.The dbf are used by both applications Fivewin and ,Net and the .Net provider doesn't handle well the FOR !Deleted() clause.
James
Re: Slow RDD experiences
It would be nice, but it would be extremely slow to find the first deleted record in a table with more than one million records unless you use a index with FOR Deleted() clauseJames Bott wrote:Patrizio,
I would suggest reusing deleted records. Whenever you want to add a new record, first look for a deleted record and if found, use it, otherwise add a new record.The dbf are used by both applications Fivewin and ,Net and the .Net provider doesn't handle well the FOR !Deleted() clause.
James
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Slow RDD experiences
Hmm, are you saying you are unable to use any FOR clauses?It would be nice, but it would be extremely slow to find the first deleted record in a table with more than one million records unless you use a index with FOR Deleted() clause
Maybe you could create another database containing the record numbers of the deleted records in the main database. When records are reused then you can delete those records. Since this database would be small, you could just search for a record that was not deleted (which would contain the recno of a record that WAS deleted in the main database). Hmm, I hope that wasn't too confusing.
James
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Slow RDD experiences
Marco,
I have never tested it myself, but here you have the docs that explain it:
http://www.ousob.com/ng/cmx/ngfe93.php
I have never tested it myself, but here you have the docs that explain it:
http://www.ousob.com/ng/cmx/ngfe93.php
Re: Slow RDD experiences
Surely it could work, I think it is more practical to schedule a weekly database's pack similarly to how we do on SQL Server.James Bott wrote:Hmm, are you saying you are unable to use any FOR clauses?It would be nice, but it would be extremely slow to find the first deleted record in a table with more than one million records unless you use a index with FOR Deleted() clause
Maybe you could create another database containing the record numbers of the deleted records in the main database. When records are reused then you can delete those records. Since this database would be small, you could just search for a record that was not deleted (which would contain the recno of a record that WAS deleted in the main database). Hmm, I hope that wasn't too confusing.
James
Re: Slow RDD experiences
I tried to use "dbInfo( DBI_SHARED,.F.)" but I got an error : DBI_SHARED : variable does not exist.
Quid?
Quid?
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7