Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  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 Text(CSV)
Subquery agg. performance is terrible
Martin Ross
2006-02-22 00:00:00
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
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
Thanks!

You guys have incredible response time and customer service.

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