Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.142
  HXTT Cobol 5.0.142
  HXTT DBF 7.1.143
  HXTT Excel 6.1.146
  HXTT Json 1.0.114
  HXTT Paradox 7.1.142
  HXTT PDF 2.0.142
  HXTT Text(CSV) 7.1.142
  Buy Now
  HXTT Word 1.1.142
  HXTT XML 4.0.143
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)

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 © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap