@SQLKiwi I might join and lurk for the same reason but looking at that thread you linked reminds me of why I stopped visiting SQLServerCentral, NOISE. Good question asked, good answer given but to identify the good from the bad, you gotta trudge through a whole lot of NOISE
@SimonRigharts If we ever end up chewing the fat over beer, and you've got time to spare while I wax-lyrical, do let us share stories of working with/for/in the public sector :)
@MarkStorey-Smith Heh, I've only been in the sector for a year and a bit (~3 years if you count working for a fully-public-funded charity), but yeah sounds like a plan
pity we're almost diametrically opposite each other on the globe though
I'm starting to wonder, though, if working in the public sector is spoiling me for when/if I go back to commercial work
@MarkStorey-Smith Sounds about right. Having mostly 9-5 work with flexible working hours is quite nice, but I figure the longer I stay the bigger the shock will be if I do move.
@SimonRigharts You may be right. Private rooms do but the perma-rooms perhaps not. They are accessible to anyone that chooses to browse their history though.
@MarkStorey-Smith Ah. I'm a little circumspect about what I post, as well - be a bit awkward if chat.se does get indexed and suddenly jumps to the top ahead of my facebook/linkedin :-/
I guess I should get a personal blog and start posting stuff to it, too. Urf.
@MarkStorey-Smith You're absolutely right about the noise. I've also pretty much given up SSC for similar reasons (and the general atmosphere has declined somewhat over the years - people seem to have forgotten we're around to help people).
To speed page generation for pages based on large postgres collections, we cache query results in memcache. However, for immutable collections that are very large, or that are rarely accessed, I'm wondering if saving server side cursors in postgres would be a viable alternate caching strategy.
T...
@jcolebrand FWIW, the AskSqlServerCentral site started as a StackExchange site before SE 2.0. When StackExchange killed that hosted model, they went OSQA.
I think there were actually two competing SQL SE 1.0 sites at the time. Can't remember the other one.
I found this answer elsewhere.
If your DB is on the local host, try leaving the host field blank in the connection as opposed to using “localhost” or “127.0.0.1″. This tells PgAdmin to connect via the local unix socket instead of TCP.
My colleague suggests that Query 1 should run faster than Query 2. If it's true, please anyone explain me the reason. Thanks.
Query (1):
IF ( SELECT COUNT(UnitTrustCounterId)
FROM UnitTrustCounter
WHERE PeriodId = 0
) > 0
SELECT 1
ELSE
SELECT 0
Query (2):
IF ...
Well I would like to comment on further aspect of using if-else with exists.
It's best to avoid using if-else with exists. Why?
You need to make sure at least one record exists in your table
This method does not allow for concurrency (specially in insert, updates transactions, it could end u...
dezso was right, the PGPASSWORD environment variable is present when executing Tomcat from a single shell, but not when it's started as a service. The solution is to put the value in the process environment:
ProcessBuilder builder = new ProcessBuilder(
"C:/postgres9/bin/pg_dump.exe",
...
I executed this on my SQL Server:
EXEC sp_configure 'show advanced options', 1
And then executed RECONFIGURE. This presented me with the following error message:
The affinity mask specified conflicts with the IO affinity mask
specified. Use the override option to force this configuration....
PostgreSQL 9.2.2 on Windows 7 64-bit.
The setting log_statement in the postgresql.conf file specifies what statements to log (none, DDL, data-modifying, or all). To what extent does setting log_statement = 'all' degrade performance? I've read that this significantly reduces performance, but th...
So for that link I just posted.. what do you do in that case for the suggested edit review? The suggested edit seems like it conflicts with the answer and would be better as a comment or a second answer.. - dba.stackexchange.com/review/suggested-edits/5564
I've skipped that one for someone else but want to learn.
@JackDouglas I do, but I was unaware of the process. I did search the dba.se FAQ, but I didn't think of going via the 'privileges' link to dba.stackexchange.com/privileges/create-tags
@SQLKiwi oops I posted the SO link didn't I. I always forget where the link to that page is tw, so while I remember, do you know you can get it by hovering over your name in the bar at the top of the dba.se page?
@SQLKiwi :-) I just want to see where you go with it. I have an idea but not enough to post the answer confidently.. I was thinking the example isn't good. We aren't using the found value in enough places (in a subquery maybe?) for enough rows returned for SQL to want to spool.. Plus there may not be enough rows anyway.
Here is a question from Joey, which is his first post on DBA.SE (his user profile shows exactly one question and no answers so far). However, the first posts review list is empty (and today's listing shows zero reviews). Shouldn't this post show up in this list?
EDIT
Recently I experience the...
Back in October, dezso asked this question which is flagged as bug fixed. However, I'm still seeing the issue that a user's first post is not showing up in the first post review list. Here is an example:
http://dba.stackexchange.com/questions/30162/mysql-replication-delay-very-serious
Back in October, dezso asked this question which is flagged as bug fixed. However, I'm still seeing the issue that a user's first post is not showing up in the first post review list. Here is an example:
http://dba.stackexchange.com/questions/30162/mysql-replication-delay-very-serious
According to my research, trygvis did review it: http://dba.stackexchange.com/review/first-posts/5569 and about 90 minutes before you asked this, give or take.
Additionally, let me show you how I got there :D
I know its something that should be avoided for performance reasons, but am trying to show a condition where it appears as a demo on how to make sure it does not appear.
However, I end up with a missing index warning, yet the optimizer chooses not to create a temporary index.
The query I am usi...
"I know its something that should be avoided for performance reasons, but am trying to show a condition where it appears as a demo on how to make sure it does not appear."
One way to get an index spool to appear naturally is to express the requirement using slightly different syntax:
SELECT DISTINCT
z.a
FROM dbo.t5 AS z
JOIN dbo.t4 AS y ON
y.a >= z.a AND y.a <= z.a
OPTION (LOOP JOIN, MAXDOP 1, FORCE ORDER);
This produces an execution plan like:
...
@Zane No worries. Ah I see you added a comment, nice.
@MikeWalsh I have a little while longer to procrastinate. I was hoping @RobFarley would be going but it looks like he isn't going to make it.
@swasheck Indeed. My snort was a sort of ironic laugh-y type thing.
@DTest If you mean the rewrite as paired inequalities, there's a link to a blog post that explains it a little bit more. Otherwise, let me know what is unclear and I will try to improve the answer. Or someone else can.
me: How are you passing in the lot number parameter? dev: Our application build the query internal and send it as is the way you see it in the request. me: So it’s not parameterized? You build the query string internally? dev: Yep. It is build within the application and the value of lot number is entered on the scanner and then application send the SQL to the database.
@SQLKiwi texas isnt all that texans believe it to be
@swasheck I do like it. Google is in the doghouse with me right now, though - about two dozen false-positive SPAMs in mailbox in last month alone. Also the Android search function is completely bugged in GMail 4.2.1. Any operation on a mail in the search results (delete, archive) causes all kinds of strange UI behavior and it's impossible to get a search result list to reliably refresh.
@swasheck I've never lost them - but what can happen is that it misleads you into the wrong operation because it's taken you to another item in the list - I really haven't figured it out. I made one screencast hoping someone from gmail would see it, but nothing. I've submitted feedback to gmail to no effect.
@CadeRoux Your G+ comment is very good. I was going to include a link to it, but I failed to discover that feature (if it exists) before I lost interest.
@dezso - I know. The foreign_key column name was just an example to illustrate a point. Regarding your solution: if I then have another table that uses the addresses table, do I then add another column to the addresses table? When does this madness end? — MegaHit51 mins ago
You have couple options. I'd describe one I like the most, but you can find others searching for 'resolving polymorphic association in database'. Add a common table for companies and contacts (I'd prefer to rename contacts to people or persons), say party. Thus, companies and contacts will have ...
Right. But if a question is worth answering, it's worth answering well. Otherwise the answerer is just massaging his or her ego, and saying "I know all the answers but I can't be bothered to explain it clearly or well". Doesn't help future visitors as much as it could does it?
I wonder if it is safe to run the Tablediff tool on a database fairly often?
Let's say every 15 or 30 minutes. Also, the Data in the DB is around 100 GB.
@SQLKiwi It was sarcasm. There are a lot of quite interesting discussions started on so and dba.se which don't fit, and are typically closed as too localized or no objective answer - while G+ could cater to that.
MBP may refer to:
Biology
* Major basic protein, a protein which in humans is encoded by the PRG2 gene
* Maltose-binding protein, a part of the maltose/maltodextrin system of Escherichia coli
* Mbp, an abbreviation for mega base pairs
* 4-Methyl-2,4-bis(4-hydroxyphenyl)pent-1-ene, a metabolite of bisphenol A
* Myc-binding protein-1, a protein encoded by the alpha-enolase glycolytic enzyme
* Myelin basic protein, a protein believed to be important in the process of myelination of nerves in the central nervous system
* Mannan-binding lectin (also mannose- or mannan-binding protein), an impo...
You have couple options. I'd describe one I like the most, but you can find others searching for 'resolving polymorphic association in database'. Add a common table for companies and contacts (I'd prefer to rename contacts to people or persons), say party. Thus, companies and contacts will have ...
If you can spin it as "why this is the wrong thing to have happen" and give a proactive method to work against it, and point out that sometimes you have to go with the design that people paying you make you do?
To speed page generation for pages based on large postgres collections, we cache query results in memcache. However, for immutable collections that are very large, or that are rarely accessed, I'm wondering if saving server side cursors in postgres would be a viable alternate caching strategy.
T...
@jcolebrand not me. powershell is like my wife. can't live without it, but (for better or worse) sometimes i just can't figure out what i did to get the result i got
it was a bit like what i hear about childbirth. it's awful when you're going through it, but a few weeks later you have something more pressing that distracts you from your past pain
@dezso i meant about the nasty @Zane query ... i dreamed of a query with a select count(*) in the return fields and thought, "SWEET!!! a table scan for every result!!!!"
ELECT P.CompanyID,
P.CompanyName,
P.StoreID,
P.StoreName,
P.ReportDate,
Isnull((SELECT Sum(FT.GrossSales - Isnull(FP.PaymentAmount, 0)) AS PullNet
FROM FactSalesTransaction AS FT
LEFT JOIN (SELECT TransactionID,
DimStoreID,
DimBusinessDateID,
Sum(PaymentAmount) AS PaymentAmount
FROM FactSalesPayment
Speaking of jobs ... anybody here know a mid-level tech looking for an IT internal office gig with some customer facing duties (mostly about server configurations and consistency) in the DFW or OKC area?
@Zane I saw a meta post by Jeff Atwood once saying something like there has to be limits on everything (time to change votes, max rep, you name it) or Bad Things Happen.
There has been a lot of talk about the daily reputation cap and what counts and what doesn't count and so on. But why is there a cap at all? I've seen lots of questions about whether the cap number should be changed, or whether certain things should or should not apply to the cap, but I've never ...