Re: Whats the difference?

From: Tibor Karaszi <no_at_spam.com>
Date: Sun, 01 Sep 2002 03:46:21 GMT
Message-ID: <h4gc9.5253$e5.862937_at_newsb.telia.net>


I can imagine that. I was under the assumption that the connection would already be in the desired database context, so no USE was necessary.

--
Tibor Karaszi


"tim erickson" <dockersblack_at_hotmail.com> wrote in message
news:cfbf4f63.0208311416.71eab4f8_at_posting.google.com...

> I have run a test ASP script connects to the server and switches
> between two databases. It makes 20 seconds difference in 10.000
> repetitions.
> Accessing to the objects using database name (database..table) is
> faster than
> USE database
> select from table
> type queries.
> Thanks for the response.
>
>
> "Tibor Karaszi" <no_at_spam.com> wrote in message
news:<5o0c9.5128$e5.825175_at_newsb.telia.net>...
> > What context?
> >
> > I don't know if "USE" is a standard command, but in SQL Server (as you
> > probably know), you switch database context with it. Besides making the
code
> > more readable and allow you to have, say, both a development database
and a
> > test database on same dbms instance (as you don't hard code database
name in
> > your code), it also improves performance to "be in" current database and
not
> > qualify object access with database name. Qualifying object access with
> > object owner name improves performance, however (reduces risk for
> > re-compilations).
> >
> > Above is based on MS SQL Server experience, I can't vouch for other
DBMS's.
> > Ansi terminology for "database" is "catalog" and for "object owner" is
> > "schema", btw.
> > --
> > Tibor Karaszi
> >
> >
> > "tim erickson" <dockersblack_at_hotmail.com> wrote in message
> > news:cfbf4f63.0208301454.9371918_at_posting.google.com...
> > > Whats the difference between these two statements?
> > > 1.
> > > "Use foo
> > > select * from bar"
> > >
> > > 2."select * from foo..bar"
Received on Sun Sep 01 2002 - 05:46:21 CEST

Original text of this message