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
  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
Heng Xin Tian Tai Ltd. of Beijing City (abbr, HXTT)

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

You guys have incredible response time and customer service.

Search Key   Search by Last 50 Questions


Copyright © 1999-2017 Heng Xin Tian Tai Ltd. of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap