« first day (2121 days earlier)      last day (3044 days later) » 

03:25
Free life advice: only admit @billinkc is right about something under NDA.
2
-4
Q: Query execution takes so much time

Sohail TaiI am trying to insert data into Temporary table with the help of Select Statement The query is: insert into tempProductCategory1 select * from ProductCategory ; Problem is that this query running fine but takes so much time. When I check the execution status with the help of show process-list...

So that question has a bit of a tortured history, and 2 reopen votes right now. The OP has improved his question to the point where I don't believe people would vote to close it. Is that enough for a reopen?
 
4 hours later…
07:28
@PaulWhite He'll still need to edit his post with the code for the other 2 functions that are in the query, plus provide explains for the queries in them. A question that looked incredibly simple is actually very complicated. A view with a select containing functions, does not a simple CTAS make
As it stands, it needs to stay closed IMO
07:41
0
Q: Need help optimizing the query with large dataset of 400+ Million rows to compare

GoniI am trying to solve this logic problem but my current MySQL schema is giving me a very poor performance with a large dataset. I have a table which contains almost half a billion telephone records. They are called the Do Not Call list or simply the DNC. When I start my campaign to dial numbers, I...

Got to love writing robo-calling software!
08:04
@ypercubeᵀᴹ I just checked the SQL 92 (in a German version), it allows every separator, including the newline character (or characters, I guess). Rather inconclusively, the only example actually uses newlines.
08:28
@dezso check in the Syntax Rules.
There is an added rule that says:
> In a <character string literal>, <national character string literal>, <Unicode character string literal>, or
<binary string literal>, a <separator> shall contain a <newline>.
(that's from 2011 version but the 92 has something similar, too)
@ypercubeᵀᴹ which section is it?
<literal>
@ypercubeᵀᴹ that's where I looked at
what I read here is that a separator contains any combination of whitespace, newline (system dependent) and comments, neither one is mandatory
Yes but Syntax Rule 4 modofies that
I missed it too when I was reading it
however, this is not the standard itself but the translation of Date, C.; Darwen, H. (1996): A Guide to the SQL Standard
08:38
> 4) In a <character string literal>, <national character string
literal>, <bit string literal>, or <hex string literal>, a <sep-
arator> shall contain a <newline>.
It's too early in the morning to be reading the SQL standard document :P
@dezso To me, that Rule seems inconsistent with another rule, at 5.2 <token> and <separator>
> 7) SQL text containing one or more instances of <comment> is equiv-
alent to the same SQL text with the <comment> replaced with
<newline>.
@ypercubeᵀᴹ possibly the 42nd formal one removed this distinction :D
It's still the same in the 2011 though
with the addition of Unicode literals
I cannot find a pointer in this book to that, which might be my problem with matching the German text with English or that of the book with missing this point
but all this, in conjunction with ietf.org/rfc/rfc2119.txt, means that PostgreSQL is standard conforming while MySQL not?
09:16
@dezso if only MySQL was not conforming to this part ;)
@dezso 9.6.1 is released on Thursday probably
09:36
@ypercubeᵀᴹ heard that, too
we just finished all minor upgrades to the current ones (9.2-9.5), so we can start over (again)
probably to be corrected/updated before the release.
Does "Azure Database(Oracle) Instance" mean essentially "Oracle Database instance on Azure"? The former sounds confusing to me.
Thanks
10:13
@AndriyM If you don't like the name of a cloud service, just wait 15 minutes.
4
10:24
1
Q: How to group all linked objects in a undirected cyclic graph

ArcturusI have a table that has customers and its joint customers. e.g Customer 1 has a joint customer 2. Customer 1 is also a joint customer to Customer 3. I am trying to group all customers that are linked and assign same GroupCustNo to them. In below table 1-2 are linked, 3-1 are linked. So 2-3 are a...

That's an interesting one
10:57
@PaulWhite A two-star joke that I fail to understand.
Probably shows my complete disconnect from clouds.
@AndriyM I think you could ask for a lengthy explanation
@dezso like varchar(8000)?
@AndriyM you might risk truncation
proper systems have text
@dezso ntext :)
@Marian no, that's not
:D
11:08
@AndriyM Microsoft changed their Azure SQL db name a few times ..
@Marian Oh I see, thanks. My disconnect from the subject was even more complete than I thought.
@AndriyM Microsoft Azure SQL Database (formerly SQL Azure, SQL Server Data Services, SQL Services, Windows Azure SQL Database) (from wikipedia)
@TomV I may have read that article once. If I have, I guess it somehow didn't register with me at the time that there were so many names for it.
11:26
@AndriyM Well you see, it's funny because Microsoft are quite famous for changing the names (and service guids) of their cloud offerings on a startlingly frequent basis. Not just Azure SQL DB - or whatever it is called today - but a huge number of the ever-expanding list of Azure services and offerings.
So the joke is, basically, that Microsoft change their cloud services names very frequently, so if you don't like one, you won't have to wait very long until it changes to something else you might like more, less, or about the same.
Obviously the 'joke' works better if they change it to better names on average, and if you see the humour in my exaggerating the frequency with which those name changes happen.
The names don't literally change every 15 minutes of course, so it's quite possible to pick holes in the joke's literal accuracy, but therein lies some of the intended humourous effect.
@PaulWhite I did indeed think that 15 minutes were probably an exaggeration, it's very nice of you to confirm that.
@AndriyM The Be Nice policy in action. Along with the Jokes Explained At Great Length Policy.
2
Both are group policies, I understand.
Ha ha ha very good (Trump would approve).
Ah, my joke works on two levels then. It's one level more than I expected.
11:53
@AndriyM you'll have to explain it for me. What joke?
3
That's the spirit.
Bummer, looks like for some people the joke worked on one level fewer than I expected.
4
12:15
@AndriyM the explanation(s) are still only 1110 character long, so the type choice is excellent
Just noticed something potentially interesting. SELECT ROUND(CAST(9.83570191 AS float),8) returns a slightly different value under compatibility level 120 versus 130. It can display identical results depending on the client's truncation/rounding rules of course.
13:09
@JamesLupolt Yeah.
0x4023ABE11EE94F3A
0x4023ABE11EE94F39
But I can't believe you find that interesting.
@PaulWhite you mean you don't?
@Lamak Nope.
Many many technical things interest me. But not that.
in @JamesLupolt defense, he said potentially interesting
@PaulWhite I used a packet sniffer to get those hex values. Did you use a different method?
@JamesLupolt Um yeah I cast it to varbinary :)
13:14
D'oh
Using e.g. WireShark is way cooler though ;)
Haha
The TDS parser in Network Monitor is a bit better
I tried using Microsoft Message Analyzer but it appears to have been built by a different civilization and I couldn't get it to work
Ah yes I guess it would be. Probably a bit less cool.
I do like wireshark. tcpdump is fun too
We're all 1337 hax0rs here.
Well, except me, I cast to varbinary.
That's really amused me btw.
13:17
@PaulWhite and the rest of us just wait for you two to get the job done
All this talking about funny and amusing things... I hope you guys are not trying to sneak in an unexplained joke here.
@AndriyM Perish the thought.
@JamesLupolt Interestingly (or not) the opening error in Bob's post only reproduces under 120.
DECLARE
    @f1 float = 576460752305.00000,
    @f2 float = 576460752305.000000

SELECT @f1 - @f2;
Under 120 that gives me 0.0001220703125
Under 130 it is 0
But you'll probably need to hook SSMS to an oscilloscope and fire kaons at it to show that yourself.
snigger
13:23
Yeah I can be a dick with the best of them.
Hopefully the company I work for isn't making any decisions based on whether the volatility of a stock is 0x4023ABE11EE94F3A instead of 0x4023ABE11EE94F39.
If they are, I guess they shouldn't be using floats.
I added a comment to the article btw.
Hm. I seem to be much more interested in this than I claimed earlier.
I hereby claim inconsistency to be a fundamental human right. We're all eventually inconsistent.
I prefer a bit of 0xDEADBEEF personally
@PaulWhite I accept that claim
you are the boss anyway
@Lamak You'll unaccept it later. As is your right.
13:28
MySQL crashes if you try and do anything with the hex 0x5CA1AB1E
4
Noice.
Shock news earlier about MySQL implementing something in the SQL Standard though.
But... what about Facebook, Uber et al?
@PaulWhite maybe it's not the topic that's interesting, but discussing it with interesting people (I'm gonna exclude myself from those people though)
@Lamak That's very profound.
Everyone, @Lamak's been kidnapped and replaced by an impostor!
2
:-O
By @billinkc
13:31
What happened to @kermit ?
Yeah right cos KFC is sooooo profound.
2
@Philᵀᴹ He went BOOM!
Last seen Sep 20 at 17:35
Slacker
@PaulWhite a profound impostor
@PaulWhite I meant that to be ambiguous (kidnapped by Bill or replaced by Bill?).
There, my first explained joke (I think).
@AndriyM Oh excellent work. Loving that.
13:34
Not at length, though, I'm still learning.
@AndriyM That's a bit of a short explanation though
@TomV It is, yeah, my bad.
@JamesLupolt I always assumed floats were safe with integer values. Perhaps the 130 change is to make that true?
For integers less than 2^n where n is 24 or 53 for SQL Server.
9,007,199,254,740,992 for float.
I guess that would explain Bob's example
It's possible.
13:47
I only noticed a difference because someone asked me why a number was 9.83570191 instead of 9.835701910000001
The extra quadrillionth wasn't a problem, he just wanted to know why
Collect all those quadrillionths and put them in a secret account :)
@PaulWhite do you remember how to see the "activity history" of a post?, I mean, where it shows when it was edited, voted, etc
@Lamak The timeline you mean?
@PaulWhite that was it
thanks
A quadrillionth of a penny saved is... a penny saved?
13:52
69
A: List of unlinked pages on Stack Exchange sites

PopsGlobal pages Site list /topbar/site-switcher/site-list, e.g. http://stackoverflow.com/topbar/site-switcher/site-list can be accessed from any site, with identical contents HTML format Hot questions for mobile http://stackexchange.com/hot-questions-for-mobile JSON format (need to parse it m...

3
@PaulWhite thanks
@AndriyM Worked for Richard Pryor.
Hmm, sorry I retracted the close vote, I had a mysql answer also but that didn't have an accepted answer. Not sure where I went wrong but I obviously did — Tom V 45 mins ago
@TomV what was the question you had linked to? I found one anyway for MySQL and closed it.
3
Q: Unique constraint across two columns

TugboatCaptainI need to add a constraint with two columns that says if any given value is present in one of the columns, then: 1) It cannot be duplicated in the same column. 2) It cannot be duplicated in the other column either. The constraint we are looking to make is with PrimaryEmail & SecondaryEma...

@ypercubeᵀᴹ My vote action added a comment which I deleted
14:02
@TomV Yeah the link was to the Q & A shown above. Slightly different title.
@PaulWhite thnx.
14:24
@PaulWhite Thanks
@PaulWhite I'd have to VtC that joke as unclear
2
Q: How to represent class table inheritance (current DBMS-specific way please)?

shannonI want to implement class either-or table inheritance (Account, CatAccountDetails, DogAccountDetails) in SQL Server. I found a recommendation for MySQL here (How do I map an IS-A relationship into a database?). Basically, it is: use identical primary keys between the parent table (Account) and...

There is a Necromancer badge. There should be a Self-Resurrection one.
2
 
2 hours later…
16:20
@Philᵀᴹ
@norbkrupa You should stop by The Heap more often :P
Stopped by
you are too literal
16:38
@kermit Hello! How's your ever-hectic executive life?
17:03
it's pretty ever-hectic
2nd kid is due next week
you?
All good, ta! All the best for the 2nd sprog...
17:18
thank you
 
2 hours later…
19:29
I cant help but think how ambitious this guy is for attempting to write his own dta.exe for another RDBMS
I guess he could decompile the .NET code but I won't suggest that because he would probably violate multiple EULA's
that would be fairly useless too since it's likely to use undocumented or propriatary features not available with other vendors
20:35
@TomV the answer you gave should be enough to at least start thinking about it
one could possibly hook into the query planner to fetch some actual data about queries
@jcolebrand I don't know if "brass tax" was a pun for "brass tacks" or a typo in your blogging meta post. I was going to edit the post but stopped because I realized you might be going for a pun.
@Erik It's a pun
ok cool. I'm glad I didn't go through with the edit and asked first
heh
it would've notified me and I would've glanced at it
@Erik what are you two talking about?
20:48
@dezso But I'm still not sure it would help him write anything for OgreSQL though :)
@TomV well, creating (but not executing) plans is cheap there, too
@jcolebrand I haven't checked in detail related to this question but I can't seem to find anything dta.exe in there even though I know about the repository, good suggestion anyway
at least usually, when I don't have one of those bright ideas
@dezso in this meta post meta.dba.stackexchange.com/q/2624/72091 it mentions "brass tax" but the proper idiom is "brass tacks"
with 40k tables it's easy to go wrong
20:49
@TomV I think I knew about the repository but forgot about it again and then came back across it today
The pun being tax vs tacks
@Erik I was after the link, thank you
Oh hi @Erik , long time no see
sure thing
Just saying that if it's going to be in .NET code, and from MS, it's probably on the repository
So no decompiling necessary
20:50
@TomV Thanks.
@Erik I felt like I had made the point clear in the following paragraph ...
@jcolebrand Most of it isn't, I remember a discussion with Solomon, sec
@jcolebrand dba.stackexchange.com/questions/136268/… see the comments on the first answer
@jcolebrand Once I knew you were going for the pun it made sense. Originally I thought you were just trying to call back to the idiom and you honestly didn't know it was really tacks.
i have a query i didnt write... and i see something like
from [tableA], [tableB]
@TomV Thanks! Good read
20:55
is this a join?
36
Q: ANSI vs. non-ANSI SQL JOIN syntax

abatishchevI have my business-logic in ~7000 lines of T-SQL stored procedures, and most of them has next JOIN syntax: SELECT A.A, B.B, C.C FROM aaa AS A, bbb AS B, ccc AS C WHERE A.B = B.ID AND B.C = C.ID AND C.ID = @param Will I get performance growth if I will replace such query with this: SELECT ...

A SQL join clause combines columns from one or more tables in a relational database. It creates a set that can be saved as a table or used as it is. A JOIN is a means for combining columns from one (self-table) or more tables by using values common to each. ANSI-standard SQL specifies five types of JOIN: INNER, LEFT OUTER, RIGHT OUTER, FULL OUTER and CROSS. As a special case, a table (base table, view, or joined table) can JOIN to itself in a self-join. A programmer declares a JOIN statement to identify rows for joining. If the evaluated predicate is true, the combined row is then produced in the...
@JzInqXc9Dg so, basically, yes
ok
and also just as a refresh.... "Join" == "left outer join" ?
@JzInqXc9Dg no
Without seeing more of your code I'm gonna go with this is a cross join
@JzInqXc9Dg depends on the where, could be a cross join
oh, what @jcolebrand says
20:57
If you mean whether the JOIN keyword on its own means a specific kind of a join, then in probably most implementations it stands for INNER JOIN.
^thats what i meant
sorry... not good questin asking
i meant JOIN keyword on its own
but not they've got me thinking... as im reading this comma join stuff
and the RDBMS if the where is *= or =* it could be an outer join in one of the directions
yes, i just noticed how there is no ON when using this comma thing (what's this called?)
so, that's why you guys are saying it depends on the WHERE clause i assume
@JzInqXc9Dg google old style joins
ok i see
21:00
@JzInqXc9Dg You can call the comma thing a comma join. Not sure if that's an official term but it's quite an established one.
so in using a comma join, you can make it all kinds of joins. inner join would have a.id = b.id in the WHERE clause for example
or outer comma join would have to be something like.... a.id != b.id
(something like that...)
No, a.id != b.id wouldn't give you an outer join.
@JzInqXc9Dg yes, AFAIK it's referred to as old style, I seem to recall it had an asterisk or + or something to define an outer join in most of the rdbms, not !=
but we're talking about something that was used 20 years ago
I'm glad I forgot the details
21:02
ok, well i think i only see it a couple times here so far. and there isnt anything in the where clause except like [field] = 'A'
whoever wrote this code - either is old code, or old person? lol
Old habits die hard
or an old RDBMS but very old if that's the case :)
@TomV sadly I see it in modern development because of this
@jcolebrand Modern != contemporary :)
What's your use case which does not require working foreign keys? — dezso 12 secs ago
21:20
Thinking about using a packet sniffer to retrieve all my query results now tbh
@dezso Low quality review sucks, I had to open the question in a new tab to downvote the answer and then click "looks ok" or "skip" since there is no downvote button in that review queue
@TomV I feel your pain
I believe there was a meta question at some point (by Aaron?) but I can't seem to find it readily
Just to clarify, but looks important for future readers: That means that you don't want to implement (and don't want to allow others to implement) relational databases onto the relevant MySQL installation, right? — MDCCL 2 mins ago
Isn't the OP saying he wants to prevent people from disabling FK checks?
I guess I'm probably misreading
21:26
Or you want to actually prevent disabling them? I am confused. — dezso 14 secs ago
@JamesLupolt seems you are right
@JamesLupolt You're probably not. Or MDCCL seems to misread likewise. (And so do I.)
@AndriyM MDCCL misread as I did and whoever upvoted my comment and the answerer, too
unless I am misreading something
I misread at first, but I was prejudiced by someone else misreading so I think another person may be reading it right
VtC unclear it is then
Perhaps foreign keys seem too foreign to the OP.
@TomV Closing it will reject the migration.
Just to keep in mind
@AndriyM or he has interesting users
21:34
@AndriyM If he clarifies by responding to the comments stating confusion and it's reopened would that reapprove the migration or is the decision final? I didn't think of that
the edit by @dezso makes it clear but I'm not sure it's the OP's intended question
@TomV When a migrated question is closed, it becomes locked on the target site. You can't do anything with it.
The OP seems to confirm @dezso's reading.
retracted
upvoted
distracted
@dezso That was a somewhat radical edit. But it probably makes sense in this case.
21:42
@AndriyM I was tempted to keep the wording, just add something like 'disabling the disablement'
I was about to suggest the answerer edit it themselves, but I guess it's fine, they've provided one of the key points (removing the super privilege) anyway.
@AndriyM ah, that
Ah, yeah, I meant the answer.
well, I guess the answerer would do it in any case
@dezso I was confused by what I interpreted as inconsistencies betweeen the title and the body content. Fortunately, the situation is clear now, the OP wants to enforce FK definitions and the situation was funny :D
21:45
@MDCCL yes, apparently reading the title helps. Sometimes.
I missed that completely
Busy here tonight

« first day (2121 days earlier)      last day (3044 days later) »