Reputation
3,017
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
12 30
Newest
 Custodian
Impact
~116k people reached

9h
comment Is adding the join columns to a table a good practice to improve performance?
What is your recommendation then?
20h
comment What collation to use for Ukraine?
I hadn't read the latest version of your answer at the time of my second comment. Whatever might have looked as if I still disagreed with you was merely just a further clarification of my point in response to @Primoz. Sorry if my comment gave you the wrong impression. I've read your answer now and it makes sense to me. Thanks for taking the trouble of clarifying your point.
1d
comment fast execution analitycs database with thousand rows to displaying in php
Are you talking about a PHP for loop that you are using to collect data for presentation or are you talking about a MySQL for loop that you are using to prepare the data for returning to your front end (PHP)? If it's the former, yours is not a database problem then, but rather a presentation problem.
1d
comment What are the built-in default configuration values of redis.conf?
According to the description on the page you've linked, that command won't help you to find out the defaults: If an option was not already present, but it is set to its default value, it is not added by the rewrite process. – so you will probably still not know the default after invoking that command.
1d
comment What collation to use for Ukraine?
@Primoz: There have been disputes (possibly still going on) among Ukrainians about the "correct" position of Ь/ь in the alphabet. So actually your question is very reasonable and may not really have an easy answer. However, sticking to the fact that there is a specific Ukrainian collation that is related to the Ukrainian locale (and there are no other collations that apply to that locale, based on the chart here) seems a perfectly safe approach to me.
1d
comment Strange behaviour of a query with order by and rownum on Oracle's Exadata server
Maybe you should add an explanation of why the other answer is wrong.
1d
comment Strange behaviour of a query with order by and rownum on Oracle's Exadata server
Your link stopped working and I replaced it. The new link does look like the new location for the same page but I'm not sure. Please take a look.
1d
comment Cannot open SQL Server profiler file
This is not about importing a trace file really, this is about accessing it in Transact-SQL (particularly, using the sys.fn_trace_gettable function).
2d
comment What collation to use for Ukraine?
I don't think the number of locales a collation applies to should determine your decision. It is true that the difference between the two collations in question seems minor, but it is there nevertheless. It all depends on the target audience, I think. Perhaps the OP's Ukrainian mate is bi-lingual (Russian/Ukrainian), as many are in Ukraine, as I am, in fact. That doesn't mean the established sorting rules should be ignored. Just saying.
Aug
25
comment Remove duplicates from multiple joins
You've likely oversimplified your query, because there's no way you could get that result with that set of join conditions. If you have 3 appointments and 2 payments for the specified customer, your query should return 3×2=6 rows for you. As your question is about the incorrect results, you should make your example more accurate. If posting the actual query is impossible, consider at least making your current result reproducible based on some data samples. My guess is you are missing a condition that links a specific appointment to a specific payment.
Aug
25
comment Schema question
On an unrelated note, if you wish to be known to this community as Eddie, you could use that as your display name instead of signing your questions, "//Eddie". We don't really use signatures here. (Your username will be under every post you submit – that is enough of a signature.)
Aug
24
comment Calculate column running total
The manual isn't perfectly explicit about that (I've looked here and here), but yes, it is you say, an ORDER BY without a frame specified implies the frame to be BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.
Aug
23
comment Using Left or substring with wildcard in SQL
Not only your SQL Fiddle example contains more rows, it also contains more different cases. For instance, there is this string: Padding, FLEX 10 400 Series, 11 Stage, BYHMP. What do you want the result for it to be, FLEX 10 400 Series or FLEX 10? I'm trying to understand whether there is always a comma after the number or not.
Aug
22
comment Count the nodes in a binary tree structure
If you are struggling to explain your problem verbally, please try to additionally provide an example that includes both a data sample and the expected output, where the expected output matches the data sample precisely. And please update your question with that information rather then using comments.
Aug
22
comment Calculate column running total
Yes, SUM() OVER (ORDER BY) is probably the best solution where it's available. However, it would probably be easier to use like this: SUM(amount) OVER (ORDER BY tx_date ASC).
Aug
22
comment MySQL - Ordering 'featured' items first
I've edited your question in an attempt to remove (or at least reduce) any ambiguity. Please take a look, and feel free to edit further or roll back my changes as necessary. Thank you.
Aug
21
comment How to avoid a “duplicate key” error?
At first I couldn't understand what the downvote was for, but it has now occurred to me that the reason could be this part of the question: "The service generates the record id…" If the service generates the ID, it's unlikely the ID will be used the way your answer assumes.
Aug
21
comment How to optimise MySQL query that uses dependent subquery
@jkavalik I've heard more than once that in MySQL an anti-join works faster if it's implemented as LEFT JOIN + WHERE IS NULL, rather than as NOT IN or NOT EXISTS, but never realised what was the reason behind it. Your explanation seems to finally clarify that for me (in addition to answering my "dependent" question), thanks.
Aug
21
comment How to optimise MySQL query that uses dependent subquery
What is the dependent subquery that your title is mentioning? I can't see any. The subquery that you do have is not a dependent one, unless I'm misunderstanding what you mean by "dependent".
Aug
20
comment Merge multiple columns into one column in different table?
This probably solves some problem but not the one in this question.