October 7, 2019 at 12:48 pm
This doesn't surprise me at all, but it does surprise me that BBC realises it's so bad it's a headline: BBC News - Copycat coders create 'vulnerable' apps https://www.bbc.co.uk/news/technology-49960387
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
October 7, 2019 at 2:40 pm
Thom A wrote:OH gods, it has a
WHERE 1=1
clause too. ??This is likely built dynamically, so the 1=1 provides a basis for the query.
But it's easy enough to clean up.ย Just REPLACE(REPLACE(@sql, '1=1 AND ', ''), 'WHERE 1=1', '')
.ย So if there are additional conditions, you remove the 1 = 1 and the following AND, otherwise you remove the WHERE 1 = 1.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 7, 2019 at 2:44 pm
But it's easy enough to clean up.ย Just
REPLACE(REPLACE(@sql, '1=1 AND ', ''), 'WHERE 1=1', '')
.ย So if there are additional conditions, you remove the 1 = 1 and the following AND, otherwise you remove the WHERE 1 = 1.Drew
True, but two issues.
It is a good idea, and something that I hope we'll implement, but it's not as simple to change as you think
October 7, 2019 at 2:49 pm
drew.allen wrote:But it's easy enough to clean up.ย Just
REPLACE(REPLACE(@sql, '1=1 AND ', ''), 'WHERE 1=1', '')
.ย So if there are additional conditions, you remove the 1 = 1 and the following AND, otherwise you remove the WHERE 1 = 1.Drew
True, but two issues.
- No where and this errors out. I have [select .... where order by xxx ]
- This code is part of what's buried in plug ins or Project Nami, and we need an author to take a PR and update their code. Otherwise, all upgrades break.
It is a good idea, and something that I hope we'll implement, but it's not as simple to change as you think
I think the optimiser will evaluate WHERE 1=1 at compile time. So removing it would make absolutely no difference to the performance of the query.
October 7, 2019 at 3:15 pm
This does change some parameterization stuff, but I think it prevents simple mode, which I'm not sure would be used here. Not sure, and haven't dug into this as other work is still ongoing.
October 7, 2019 at 7:14 pm
drew.allen wrote:But it's easy enough to clean up.ย Just
REPLACE(REPLACE(@sql, '1=1 AND ', ''), 'WHERE 1=1', '')
.ย So if there are additional conditions, you remove the 1 = 1 and the following AND, otherwise you remove the WHERE 1 = 1.Drew
True, but two issues.
<li style="list-style-type: none;">
- No where and this errors out. I have [select .... where order by xxx ]
<li style="list-style-type: none;">
- This code is part of what's buried in plug ins or Project Nami, and we need an author to take a PR and update their code. Otherwise, all upgrades break.
It is a good idea, and something that I hope we'll implement, but it's not as simple to change as you think
I don't see how you are getting SELECT ... WHERE ORDER BY xxx
assuming that you are starting with SELECT ... WHERE 1=1 ORDER BY xxx
, the first replace won't match, because there is no trailing AND
, so it will leave you with the original string and the second will produce SELECT ... ORDER BY xxx
, because the WHERE
is included in the matching string 'WHERE 1=1'
.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 8, 2019 at 4:52 pm
Ah, you're right, Drew. I was thinking this was a code replacement that would leave the WHERE, but that would work. However, it's also a PR to upstream modules, not something we want to change directly.
October 16, 2019 at 12:22 pm
Oracle driver oddities: create table as select * @from_dblink 1 minute. SSIS select * + rowcount: 80 minutes with Oracle Oledb ๐
October 16, 2019 at 12:30 pm
Oracle driver oddities: create table as select * @from_dblink 1 minute. SSIS select * + rowcount: 80 minutes with Oracle Oledb ๐
Does the SSIS time go down if you use a column list instead of *?
October 17, 2019 at 8:37 am
Doesn't seem to make a difference. I'll have to try it in a proper testing environment
October 17, 2019 at 1:38 pm
The normal Oracle drivers for SSIS are really slow. The worst part is that it seems to be by design. I had far better luck exporting to a flat file and getting data from there.
Have you tried using the Attunity Connectors?
October 17, 2019 at 3:21 pm
Is on-premise. Tried the Attunity Connectors but can't find how to use expressions (SQL command from variable) for incremental updates.
October 17, 2019 at 3:28 pm
I've found that using the latest Oracle drivers is much more efficient than the MS drivers, is that an option?
๐
BTW: in a recent project, I experienced up to 10x difference between different drivers ๐
Viewing 15 posts - 64,066 through 64,080 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply