Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
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
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT Text(CSV)
Subquery agg. performance is terrible
Martin Ross
2006-02-22 00:00:00.0
This query performs terribly.

create table PATIENT
(
status varchar (2),
notsure varchar (7),
lastName varchar (20),
firstName varchar (11),
gender varchar (1),
dob varchar (8),
HealthCardNum varchar (12),
healthCardversionNum varchar (2),
number varchar (8),
comments varchar (20),
streetAdressLine1 varchar (30),
city varchar (15),
province varchar (3),
postalCode varchar (6),
homePhone varchar (10),
workPhone varchar (10),
secondAddress varchar (81),
dunno varchar (49),
dunno1 varchar (4),
due varchar (8),
due2 varchar (8),
patKey2 varchar (3),
morepadding varchar (16),
flag varchar (1),
eor varchar (35),
tempPK char (14)
);


select * from PATIENT
where tempPK in(
select tempPK from PATIENT
group by tempPK
having count(tempPK) > 1
)

The table only has 12k rows and individually each one performs well. Moreover this is not a corelated subquery so the optimizer should ensure that it runs quickly.
Re:Subquery agg. performance is terrible
HXTT Support
2006-02-24 00:00:00.0
Please download the latest package:
v2.1.122 optimizes IN, NOT IN, ALL, and ANY on subquery.
v2.1.122 provides universal table declaration for a series of tables with the same table structure. '?' represents any single character, and '*' represents a string of zero or more characters. For instance, create table "*.log" (...); create table [*a?b.*"] (...). Universal table declaration is only visible for the current connection, and isn't prior to any specific table declaration.

According to our test for your sql, it can fetch all rows in 2s for a patient table with 20k rows.
Re:Re:Subquery agg. performance is terrible
Martin Ross
2006-02-24 00:00:00.0
Thanks!

You guys have incredible response time and customer service.

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap