Re: DBParameter vs. direkter Angabe im SQL-Statement



Hallo Günter,

Hallo Daniel!

Gegenüber

INSERT INTO namen ( name ) VALUES ( "Müller" )

nicht unbedingt,

Doch schon. Siehe meine Antwort an Paul.

Nö, nicht unbedingt! ;-)
SQL Server 2005 hat "auto-parameterized queries". Angenommen ich
schicke zuerst das genannte Query zum Server:

INSERT INTO [namen] ([name]) VALUES ("Müller")

Dann ersetzt der SQL Server alle Konstanten durch Variable ...

INSERT INTO [namen] ([name]) VALUES (?)

.... erstellt seinen Execution Plan und kann dann bei den Queries ...

INSERT INTO [namen] ([name]) VALUES ("Meier")
INSERT INTO [namen] ([name]) VALUES ("Schulze")

.... den gleichen Execution Plan verwenden.

Aber man beachte mein "nicht ->unbedingt<-". Es gibt natürlich
Bedingungen unter denen der SQL keine Auto-Parametrisierung vornimmt.

--
MfG,
Daniel Kuppitz

.



Relevant Pages

  • Re: Database server job (QZDASOINIT) performance anomaly
    ... Following an IPL of the iSeries, the Windows server in one location ... hangs when running the queries. ... sometimes sql ptfs may change sql behavior a lot:-| ...
    (comp.sys.ibm.as400.misc)
  • Re: Database server job (QZDASOINIT) performance anomaly
    ... the same set of SQL queries against our iSeries; only the value of a location parameter changes from one remote server to another. ... Queries that used to run in a couple of minutes, and that continue to run for that duration in the other remote locations, now run 15 minutes or longer, sometimes for hours. ...
    (comp.sys.ibm.as400.misc)
  • Re: MSDE replacing Access2000 in VB Application
    ... I agree with Mary but wanted to point out that the next version of MSDE (Sql ... server 2005 express) is supposed to support the cross tab queries (PIVOT I ...
    (microsoft.public.sqlserver.msde)
  • Re: form-based parameters in a query (access 2003 - ADP)
    ... Oh and if you're using an ADP, your saved queries are on the server as well, not just the tables. ... Alan wrote: ... Create the SQL text and plop in the value of Region just before you execute it. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Linked Tables in Access
    ... server, or would I also need to convert *those* queries to passthrough ... I've been trying to understand why Access database files become corrupt. ... Even if the Jet Expression Service processes a query on the client, does SQL ...
    (microsoft.public.access.adp.sqlserver)