Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT DBF
search query problem
Milosz
2010-08-24 04:03:02.0
Hi,

I have dbf file, about 1500000 records and indexe (NTX): MONTH+Account+Client_ID. I also created CGP file.

Simple query "select * from OBR where month='12' and account='10100'" takes about 10 seconds, but query "select * from obr where account='10100' takes only 2 seconds.

Could you explain where I is the problem? Is database too big?

Thanks in advance
M.
Re:search query problem
HXTT Support
2010-08-24 04:45:34.0
>I have dbf file, about 1500000 records and indexe (NTX): MONTH+Account+Client_ID.
>I also created CGP file.
>Simple query "select * from OBR where month='12' and account='10100'" takes about 10 seconds,
>but query "select * from obr where account='10100' takes only 2 seconds.
>MONTH+Account+Client_ID.
Whether there's three NTX files for MONTH, Account, and Client_ID, or one NTX file for three columns?

>Could you explain where I is the problem? Is database too big?
If there's an MONTH+Account+Client_ID NTX file, HXTT DBF can use it to query where month='12' and account='10100'.
If there an Account NTX file, HXTT DBF can use it to query where account='10100'.
If there's not an MONTH+Account+Client_ID NTX file, but there're MONTH NTX file and Account NTX file, HXTT DBF can use both files to query where month='12' and account='10100'.
You can try "select * from OBR where account='10100' and month='12'" too, which mabye is quicker than where month='12' and account='10100'.
For month='12', maybe there is 1500000/12=125000 rows. For account='10100', maybe there 1500000/possibleAccountNumber=148 rows.

Although all of where clauses use index files, different where clause and index tree will result different speed.



Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap