On 07/07/2014 03:12 AM, Nissl Reinhard wrote:
Hi,

while preparing this statement


create table gpBestellvorschlagInfo as
select GanttPlanID
, BestellterminRaw
, case when not (
      select max(HinweisCodiert)
      from Bestellvorschläge
      where ArtikelOID = o.ArtikelOID
          and HinweisCodiert <> 1
) is null then
(
      select group_concat(Hinweis, x'0d0a')
      from (
          select distinct Hinweis
          from Bestellvorschläge
          where ArtikelOID = o.ArtikelOID
          order by HinweisCodiert desc
      )
)
else
      null
end as Hinweis
from BestellVorschläge o
where not GanttPlanID is null


I get this log message twice:

automatic index on Bestellvorschläge(ArtikelOID)

I hope that the index is created only once when executing the prepared 
statement. But does the query optimizer consider the costs for creating the 
index twice?

Suspect that two copies of the same automatic index are created. Assuming this is the case, the cost calculations will take it into account.




_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to