Re: opinions on this SQL statement
Posted in 2004
Fernando Nunes — — source: Usenet: comp.databases.informix
Art S. Kagel wrote: > > Uh, NO! If the sub-query is not correlated, then Informix executes it once > only. If the sub-query IS correlated, then Informix unwinds the sub-query > performing a simple join instead (this is called sub-query flattening) again > only performing the sub-query once. I know about sub-query flatening... But I've seen this happen (with "IN"). The number of sequential scans was proportional to the "outside table" number of rows. There was no usable INDEX on the "inner table" (in fact it was the same table). The time spent on this query was verrrrry long. With appropriate index it was almost instantly. Regards.