Icon View Incident Report

Serious Serious
Reported By: Fernando Dias
Reported On: 2/18/2007
For: Version 1.00 Build 1
# 2234 Table-Prefaced Asterisk in SELECT List Causes All Columns from Both Tables to be Selected

As you can see in the attached plan , the following SQL is returning the first 3 columns of c and all columns of f as asked, but is also returning ALL columns of c (including a duplication of the first 3):

Original SQL:

select
  c.ref,c.titulo,c.interprete,f.*
from
  catalogo c left outer join faixas f on f.ref=c.ref
order by
  c.ref, lado, faixa, subfaixa

================================================================================
SQL Query (Executed by ElevateDB 1.00 Build 1)

Note: The SQL  shown here is generated by ElevateDB and may not be exactly the
same as the SQL that was originally entered.  However, none of the differences
alter the execution results in any way.

================================================================================

SELECT ALL
"c"."ref" AS "ref",
"c"."titulo" AS "titulo",
"c"."interprete" AS "interprete",
"c"."Ref" AS "Ref1",
"c"."Fmt" AS "Fmt",
"c"."NSuportes" AS "NSuportes",
"c"."Compilacao" AS "Compilacao",
"c"."Titulo" AS "Titulo1",
"c"."Interprete" AS "Interprete1",
"c"."DataProd" AS "DataProd",
"c"."DataEdi" AS "DataEdi",
"c"."Etiqueta" AS "Etiqueta",
"c"."Importado" AS "Importado",
"c"."Edicao" AS "Edicao",
"c"."LadoA" AS "LadoA",
"c"."LadoB" AS "LadoB",
"c"."LadoC" AS "LadoC",
"c"."LadoD" AS "LadoD",
"c"."LadoE" AS "LadoE",
"c"."LadoF" AS "LadoF",
"c"."LadoG" AS "LadoG",
"c"."LadoH" AS "LadoH",
"c"."EAN" AS "EAN",
"c"."Preco1" AS "Preco1",
"c"."Preco2" AS "Preco2",
"c"."Preco3" AS "Preco3",
"c"."Preco4" AS "Preco4",
"c"."TipoMusica" AS "TipoMusica",
"c"."InfoProd" AS "InfoProd",
"c"."Promocao" AS "Promocao",
"c"."Obs" AS "Obs",
"c"."Publicar" AS "Publicar",
"c"."ClassIFPI" AS "ClassIFPI",
"c"."CriadoPor" AS "CriadoPor",
"c"."CriadoEm" AS "CriadoEm",
"c"."AlteradoPor" AS "AlteradoPor",
"c"."AlteradoEm" AS "AlteradoEm",
"c"."FichaTec" AS "FichaTec",
"f"."Ref" AS "Ref12",
"f"."Lado" AS "Lado",
"f"."Faixa" AS "Faixa",
"f"."SubFaixa" AS "SubFaixa",
"f"."CodMusica" AS "CodMusica",
"f"."Obs" AS "Obs1",
"f"."Tempo" AS "Tempo"
FROM "catalogo" AS "c" LEFT OUTER JOIN "faixas" AS "f" ON "f"."ref" = "c"."ref"
ORDER BY "c"."ref", "f"."Lado", "f"."Faixa", "f"."SubFaixa"

Source Tables
-------------

catalogo (c): 8711 rows
faixas (f): 56126 rows

Result Set
----------

The result set was static
The result set consisted of zero or more rows

Joins
-----

The driver table was the catalogo (c) table

The catalogo (c) table was joined to the faixas (f) table with the left outer
join expression:

"f"."ref" = "c"."ref"

The optimizer attempted to re-order the joins to a more optimal order

The joins were already in the most optimal order

The following join condition was applied to the faixas (f) table:

"f"."ref" = "c"."ref" [Index scan]

================================================================================
60430 row(s) returned in 9,25 secs
================================================================================



Resolution Resolution
Fixed Problem on 2/18/2007 in version 1.01 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image