Ask a Question related to ASP Database, Design and Development.
-
Astra #1
Speeding up in-line queries
Hi All
I know this is a 'try it yourself' thing, but is it generally true that
in-line query (A):
strSQLQuery = "update accounts set fred='" & strfred & "',bob='" & strbob &
"', etc
is not pretty to read as one long string, BUT a lot faster to execute than
in-line query (B):
strSQLQuery = "update accounts set "
strSQLQuery = strSQLQuery & "fred='" & strfred & "',"
strSQLQuery = strSQLQuery & "bob='" & strbob & "',
etc etc
Yes?
Thanks
Robbie
Astra Guest
-
Speeding up SQL queries
Hello group, I have a database with a lot of entries (I'm talking about ten-thousands) running on a rather slow machine (500 Mhz, 128 Mb memory).... -
Need help speeding up an algorithm...
I created a pretty simple Perl script to create .m3u files for all genres in my music library. (I eventually want to expand the script to be able... -
Speeding up
Hi folks, just looking for hints. FMP 6.0v4 Dev on Win 98 (about to shift to XP) I'm running a solution every week that combines 3 text files... -
Speeding up LWP::Simple
Hi all, I am looking to collect the HTML of approximately 30 million urls, in as simple a manner as possible, perhaps using the LWP::Simple... -
Help with speeding up searches
"Jeroen Braun" <jnjbraun@euronet.nl> wrote in message news:<3e72995a$0$57483$1b62eedf@news.euronet.nl>... The table was not built by me. I was... -
Bob Barrows [MVP] #2
Re: Speeding up in-line queries
Astra wrote:
It's faster, but not a LOT faster. You will only be able to notice the> Hi All
>
> I know this is a 'try it yourself' thing, but is it generally true
> that in-line query (A):
>
> strSQLQuery = "update accounts set fred='" & strfred & "',bob='" &
> strbob & "', etc
>
> is not pretty to read as one long string, BUT a lot faster to execute
> than in-line query (B):
>
> strSQLQuery = "update accounts set "
> strSQLQuery = strSQLQuery & "fred='" & strfred & "',"
> strSQLQuery = strSQLQuery & "bob='" & strbob & "',
> etc etc
>
> Yes?
>
difference in a loop that's building a huge string.
The real problem is the possibility of SQL Injection:
[url]http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23[/url]
[url]http://www.nextgenss.com/papers/advanced_sql_injection.pdf[/url]
[url]http://www.nextgenss.com/papers/more_advanced_sql_injection.pdf[/url]
You should not be using dynamic sql. Stored procedures is the most secure
methodology.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] Guest
-
Aaron [SQL Server MVP] #3
Re: Speeding up in-line queries
Other than the building of the string, there will be no difference in
executing (A) vs. (B). These queries will look identical to the database.
And I agree with Bob. STOP USING AD HOC SQL.
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Astra" <info@NoEmail.com> wrote in message news:40d348fe$1_4@127.0.0.1...> Hi All
>
> I know this is a 'try it yourself' thing, but is it generally true that
> in-line query (A):
>
> strSQLQuery = "update accounts set fred='" & strfred & "',bob='" & strbob
> &
> "', etc
>
> is not pretty to read as one long string, BUT a lot faster to execute than
> in-line query (B):
>
> strSQLQuery = "update accounts set "
> strSQLQuery = strSQLQuery & "fred='" & strfred & "',"
> strSQLQuery = strSQLQuery & "bob='" & strbob & "',
> etc etc
>
> Yes?
>
> Thanks
>
> Robbie
>
>
Aaron [SQL Server MVP] Guest
-
Laphan #4
Re: Speeding up in-line queries
Hi Guys
Thanks for the feedback, but I've got use ad hoc queries because my db is
MySQL 4.
Can't afford SQL Server hosting at present, as I'm trying to get my foot in
the door with clients.
Rgds
Robbie
Aaron [SQL Server MVP] <ten.xoc@dnartreb.noraa> wrote in message
news:eHg2yjgVEHA.3420@TK2MSFTNGP12.phx.gbl...
Other than the building of the string, there will be no difference in
executing (A) vs. (B). These queries will look identical to the database.
And I agree with Bob. STOP USING AD HOC SQL.
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Astra" <info@NoEmail.com> wrote in message news:40d348fe$1_4@127.0.0.1...> Hi All
>
> I know this is a 'try it yourself' thing, but is it generally true that
> in-line query (A):
>
> strSQLQuery = "update accounts set fred='" & strfred & "',bob='" & strbob
> &
> "', etc
>
> is not pretty to read as one long string, BUT a lot faster to execute than
> in-line query (B):
>
> strSQLQuery = "update accounts set "
> strSQLQuery = strSQLQuery & "fred='" & strfred & "',"
> strSQLQuery = strSQLQuery & "bob='" & strbob & "',
> etc etc
>
> Yes?
>
> Thanks
>
> Robbie
>
>
Laphan Guest
-
Aaron [SQL Server MVP] #5
Re: Speeding up in-line queries
> Thanks for the feedback, but I've got use ad hoc queries because my db is
If you say up front what database platform / version you are using, you are> MySQL 4.
less likely to get irrelevant advice.
We can't remember what database platform every single user is using.
Especially when you switch randomly from astra to laphan and back again...
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
Aaron [SQL Server MVP] Guest
-
Laphan #6
Re: Speeding up in-line queries
Hi Aaron
Apols for the schizophrenia.
I really appreciate the advice from both of you and will try to remember to
confirm my setup.
Forgiven? :0)
Now about the best way to flit between http and https when end users like to
go back and forth....
Aaron [SQL Server MVP] <ten.xoc@dnartreb.noraa> wrote in message
news:uHBRZ3jVEHA.1472@TK2MSFTNGP09.phx.gbl...If you say up front what database platform / version you are using, you are> Thanks for the feedback, but I've got use ad hoc queries because my db is
> MySQL 4.
less likely to get irrelevant advice.
We can't remember what database platform every single user is using.
Especially when you switch randomly from astra to laphan and back again...
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
Laphan Guest



Reply With Quote

