« first day (464 days earlier)      last day (4408 days later) » 

6:41 AM
@Martin, this is great:
14
Q: What's the difference between a temp table and table variable in SQL Server?

Martin SmithThis seems to be an area with quite a few myths and conflicting views. So what is the difference between a table variable and a local temporary table in SQL Server?

 
gbn
Morning all
 
7:14 AM
morning
 
gbn
Not SQL Server but still DBA though
 
thnx
 
8:10 AM
Mornin'
 
9:05 AM
Morning
 
hiya
 
hi
 
 
3 hours later…
11:44 AM
Quiet in here today...
 
Ell
11:55 AM
hi guys :)
 
 
2 hours later…
1:48 PM
Any Oracle expert to answer this one at SO?: Oracle faster overlap check
Would a spatial index help? Would 2 separate indexes on the columns be enough?
 
2:40 PM
@ypercube I've never had to use spatial
2 indexes works ok for me though
 
3:29 PM
1
Q: How to seperate sensitive data in database(MySql)

carloI need to design a database that will contains information about personal disease of users. What can be the approach in order to implement the columns of the DB's tables: encrypt the information, separate data within two differents DB, one for sensitive data and another for not sensitive data, or...

I love getting business requirements like this
Brings back memories of slapping PCI auditors :D
 
4:10 PM
Interesting problem:
2
Q: RSync Database File Deltas in SQL Server 2008

Gyrfalcon2138Alright, I feel like this is a terrible idea, but I need some help understanding why this is bad: I'm still working on implementing a disaster recovery/business continuity solution for our datacenter. We're running MSSQL 2008 Enterprise and we plan on running a passive instance in the cloud. Cur...

 
Holy crikey's I'm about to be over 3k and I haven't added an answer or Q in months. Yay NecroRep
 
grats!
 
4:26 PM
necrorep
 
5:17 PM
The kind of crap that drives me crazy - guy accepts my answer even though he can't figure out how to use it, then un-accepts and accepts another simpler answer. Even though I wrote a complete procedure for him that would have worked if he knew how to copy and paste: stackoverflow.com/questions/10126212/…
I guess I'm mostly annoyed because I took time out of my vacation to give the guy a proper "you're doing it wrong" answer. I had to edit my answer three times because he edited the question three times. I wish we could apply warning flags to troublesome users.
40 minutes of my vacation I'll never get back - closing the lid, ciao folks
 
It's this sort of thing that stirs the DBA name pot, eh?
 
Why post a SQL server answer to an Oracle question?
 
So are these two the DBA.SE equivalent to "THIS IS WHY WE CAN'T HAVE NICE THINGS!" or "GET OFF MY LAWN!"?
 
I advise you to downvote incorrect answers. You can upvote on a successive edit
 
5:33 PM
@swasheck well, I don't feel a SQL server answer was relevant. Berate me if I'm wrong
 
@Phil i upvoted your comment
 
I'm all for DB agnostic advice, but that doesn't appear to fall into the realm
Oh, ok :)
 
It's not that you're wrong, but there's a level of truth behind each of those rants, when used in the correct context. Both of these situations seem to be the correct context.
I believe that you are correct, @Phil
But here's my question. I downvoted that answer. -1 to rep (it's not that precious to me, but I don't have a whole lot of it to toss around like some of us [ahem @jcolebrand]).
Answer deleted. Still took the hit.
 
You'll survive
 
just answer or ask a question and you'll get that and much more :D
 
5:40 PM
don't tell 'im all the secrets!
 
aww, someone unaccepted one of my answers :(
although the new accepted answer is very valid, cool.
 
@jcolebrand indeed
meh. i dont have a whole lot to even worry about
 
@AaronBertrand Low rep, long question, poor grammar, "Why no worky?" question... all the red flags were there. Be pickier about what you answer, especially on a large site like SO where there is a lot of crap.
 
@swasheck you now have 4 more than before you downvoted.
 
@jcolebrand mind = blown. this whole reputation thing is a funny beast.
 
5:48 PM
@swasheck I upvoted one of your Q :p
-1 downvote, +5 upvote = +4
 
neato mosquito
I wasnt saying that to beg for upvotes. I was just making an observation, but thanks. :)
 
I know
hence I did it. had you been begging I would've dismissed it
psychology is a tricksy business
 
Do you have any thoughts on an answer to the question that you upvoted?
 
I didn't really look .. link me?
 
3
Q: Sql Server Full Text Search one table for text values in another table

swasheckIs it possible to run a full text search on an FTS-indexed column for all values in another table? Conceptually it'd look like select d.* from Docs d, Tags t where CONTAINS(d.fulltext, t.tagvalue) I'm rather new to MSSQL FTS, though I know that the equivalent would work in postgres select d....

 
5:57 PM
hi
 
Where It's At
 
can i ask a question? anybody?
 
Ooh, pick me!
 
sure!
 
why dont you have a seat right over there
 
6:03 PM
I have a search key, I have a products title table. Im going to select from title table, like, SELECT * FROM titles WHERE title LIKE '%searchkey%'. Now, this is standard. Lets say my search key is of 5 words namely, A B C D E. Example, "nokia lumia 800 phone windows". Now, if I, SELECT * FROM titles WHERE title LIKE '%nokia lumia 800 phone windows%. I wont get any result because, title is "nokia lumia 800" only. What do I do now?
phil, im still counting on you
 
You haven't stated which RDBMS.
 
@beck03076 If you want to match any of the keywords, you need multiple LIKEs separated by ORs. If you want something more complex than that, you need to use something like Full-text search or an external search component like Lucene.
 
Mysql
 
Plus it's pub time. @swasheck told you where to go :)
 
@nick
@NickChammas I understand your point. Im going to install sphinxsearch, anyway. But thing is, which is efficient?. Right now, Im doing a, LIKE '%A%B%C%D%E%' and if I dont get any results, I will query it again with LIKE '%A%B%C%D%', and so on upto LIKE "%A%". At one point I will get results. Do you think this is fine. To summarize, if the number of search keywords is n. Then I will query the table n number of times, that being the worst case scenario.
 
6:20 PM
@swasheck to answer your question, no I don't know
@remusrusanu got any thoughts on dba.stackexchange.com/questions/14605/…
 
@beck03076 You can futz it like that to make it work, but the complexity of this solution, and the fact that it does not allow you to weigh your matches (e.g. matching on "lumia" is better than matching just on "nokia") should tell you that you need a full-text search solution that plain SQL cannot give you.
 
@NickChammas Yes, matching on lumia is way better than just nokia. So what do I do. Im going to install SphinxSearch. Does that bring full-text search into the picture?. Please bear with my partial knowledge?. If not, how do I bring it in?
 
7:17 PM
@beck03076 Well, you can build something yourself, or incorporate full-text search. I don't have direct experience with FTS so I can't help you further. Do some research and come back if you have a specific question about how to use FTS in your situation.
 
I will do it. Finally. can you give me one little example for a FTS?
 
select [column] from titles where CONTAINS(title, 'NOKIA')
select [column] from titles where CONTAINS(title, 'nokia lumia 800 phone windows') will search for that phrase
boolean operators can be combined to further refine your search
 
@swasheck Thank you so much man. Thats exactly what I was looking for. 1. Is this available in mysql?...2. What about performance when compared with like '%nokia%', (I already hear, like degrades performance).{ I can also understand If extreme indexing is done on products table title column by some engine on steroids, the contains can be a player}
 
I'm sorry. I just assumed you were using MSSQL. MySQL does have full text search
but I am completely unfamiliar with it.
 
thats ok
but your pointers served as a great lead
 
7:30 PM
I've not heard great things about FTS in MySQL
but there is Sphinx which you can configure to run against MySQL
 
alright. Just tell me this. "select [column] from titles where CONTAINS(title, 'nokia lumia 800 phone windows') " will this query match , "nokia lumia 800"(without "phone windows")..?
 
I don't believe it will because it's looking for that phrase
So you'd have to organize your query with the appropriate boolean operators
 
its looking for "nokia lumia 800 phone windows" right?.. then whats the point swasheck?.. I would use, LIKE "%nokia lumia 800 phone windows%".
Ok tell me how you would approach with boolean operators for this problem statement
 
@beck03076 Right ... except FTS indexes would make the query more efficient
it depends
 
depends on what?
 
7:36 PM
what are you hoping to find? what are the essential phrases?
 
i will repeat my problem ok?
 
i see it now, sorry
so ANY of those words
you want matched?
 
my input to a query will be "nokia lumia 800 phone windows" and i want the query to match "nokia lumia 800" alone...
you got it right
ANY of those words ..correct
 
select [column] from titles where CONTAINS(title, 'nokia OR lumia OR 800 OR phone OR windows')
 
not only ANY of those... sometimes a GROUP OF ANY of those..
 
7:39 PM
what are the rules that dictate the "sometimes"
 
what about "select [column] from titles where CONTAINS(title, 'nokia lumia 800 phone windows OR nokia lumia 800 phone OR nokia lumia 800 OR nokia lumia OR nokia')"
Now i want the system to stop proceeding when it finds. Because, when it finds nokia lumia 800, its pointless matching nokia lumia and nokia again and again, 3 words together spot a match which is more relevant
 
You'll get some false positives in there because you have OR nokia
@beck03076 You're looking for something that is based off of a user search, right?
 
exactly right
the user is trying to locate a product
he knows partial title
 
Quite a good set of lecture slides on cosine ranking algorithms as used in text retrieval systems.
 
@ConcernedOfTunbridgeWells Seriously? Have you read through this?
(not the slides)
 
7:44 PM
@swasheck Through what?
The conversation?
 
@ConcernedOfTunbridgeWells yes
 
Looks like the OP wants to match on phrases, which is kind of a fiddly problem in text retrieval circles.
 
Indeed
 
(I did my 3rd year software engineering project hacking a text retrieval system called mg to be aware of javadoc structures).
 
Nice
 
7:45 PM
Not nice - 6OK lines of C maintained by successive generations of MSc students.
 
It seems like he's looking to compensate for incomplete/inadequate end-user information
@ConcernedOfTunbridgeWells ouch
 
@swasheck Fortunately I didn't have to frig it too much - really just changing some definitions of what it considered to be white space IIRC.
 
@beck03076 Here's my suggestion. You seem to have the makings of a question. Based on what you already know and what you've gained from @NickChammas, you might want to put this to a question.
 
But I did get it to correctly answer questions such as 'format floating point number' with the right classes to do it in JDK 1.1.
 
@ConcernedOfTunbridgeWells and that's saying something
 
7:48 PM
Obligatory reference to old SO answer on cosine ranking
5
A: Full-text search relevance is measured in?

ConcernedOfTunbridgeWellsThe basic data structure for a text retrieval system is an Inverted Index. This is essentially a list of words found in the document collection with a list of the documents they occur in. It can also have metadata about the occurrence for each document, such as the number of times the word appe...

And a rather tedious looking journal article on phrase searching
However I'm not aware of any RDBMS with a FTS function that's that clever.
 
@ConcernedOfTunbridgeWells Hey, thanks for stepping in. Can you explain to me on a HIGH LEVEL as to what is going on in cosine ranking approach?
Alright, thanks @swasheck and @ConcernedOfTunbridgeWells, it was very informative and im going to go through all of it that you guys provided. Break a leg.
 
 
2 hours later…
10:06 PM
@beck03076 Conceptually you make a pair of n-dimensional vectors where each dimension corresponds to a word or a phrase. If you're matching two documents then you count the occurence of each word or phrase on each document's vector. If you're doing keyword searches then the set of keywords becomes the second document. The vector of counts becomes a point in n-dimensional space (obviously n could be quite a large number of dimensions for a document-to-document match).
2
The dot product of these vectors is the cosine of the angle between the vectors in n-dimensional space.
You can do searches based on nearest-neighbour algorithms to cut down the search space from requiring you to do the comparison for each document. Then you stuff your search results into a priority queue based on the cosine of the angle between the vectors.
Two parallel vectors will have a cosine of 1 (cos (0) = 1) The angle will grow further apart as the documents get more dissimilar, with the cosine of the angle trending to 0. The highest cosine ranked document will pop out of the top of the priority queue.
Pagerank works by weighting the cosine values with secret formulas based on popularity, spamminess heuristics, heuristics that detect obvious gaming of search results and suchlike.
This probably doesn't help much apart from a brief primer on the theory behind text retrieval systems. Perhaps it might give you some insight into the subtleties of your problem, though.
 
 
1 hour later…
11:46 PM
@ConcernedOfTunbridgeWells : Thank you so much, it was amazing and the best part is I understood 80% of what you said. I will take this as a lead and do my research to understand what you said in totality. Yes, I would be more happy if you stay back, make my brain understand all of it. I love examples. If you can quote an example and explain this concept, I will rejoice and share it with many people at work as well.
@ConcernedOfTunbridgeWells : Great talking to you. Im signing off. Thanks. Thanks. bye
 

« first day (464 days earlier)      last day (4408 days later) »