Reputation
4,844
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
8 19 31
Newest
 Steward
Impact
~417k people reached

Apr
24
comment Trying to create PostGIS database
Thanks, but you've basically added a link-only answer which we don't like here because they break over time. Please add stand-alone answers, though supporting links are fine.
Apr
22
comment frequently dropping table in sql server
I presume you have no foreign keys reference table in question.
Mar
14
comment How to check if the table has rows?
I like your second solution. There's no point in doing a count(*) of the entire table just to determine whether the table has any rows.
Mar
10
comment How can I swap two values from particular column in a table in Postgres?
Huh? Data in a table or in query results are never in any particular order. And if you are relying on a particular ordering because of the way a query works, or the way in which the data happens to be stored, your queries are broken. To achieve a particular ordering, you need to use order by.
Mar
8
comment Is automatic failback on Postgres 8.4 possible via log shipping/PITR?
And of course the $64 question is why you can't upgrade to a newer version of Postgresql where a lot of this stuff is much easier?
Mar
3
comment How can I swap two values from particular column in a table in Postgres?
Is this in a query? Or do you want to perform an update?
Feb
3
comment Stored procedure vs transaction anomaly
Like @a_horse_with_no_name says, this is expected behaviour!
Jan
29
comment How to combine UNION and INNER JOIN?
This doesn't answer the question.
Dec
2
comment ORA-12546: TNS:permission denied, on Windows through Task Scheduler
I'm guessing when you run normally you are running as a user that is a member of the ORADBA group, which can login into the database without supplying a password. When it runs from schedule it runs as a different user. Is this the case?
Oct
28
comment Where all can the /*+ PARALLEL */ hint be used?
This doesn't answer the question. It's just a generic statement about Oracle's parallel capabilities, not a specific answer about where the parallel hint can be used.
Oct
26
comment Error in trigger: table X is mutating, trigger/function may not see it
Your trick is really bad advice.
Oct
17
comment Execution plan depends on where output columns are concatenated
As another potential work-around, what happens if you include both the original columns and the concatenation?
Oct
8
comment Faster query with pattern-matching on multiple text fields
What's the purpose of concatenating first_name and last_name with a zero-length string between them?
Oct
8
comment Faster query with pattern-matching on multiple text fields
Which version of PostgreSQL are you using? Please edit this (and the fact that you are using B-tree indexes) into your question so we can delete these comments.
Oct
8
comment Faster query with pattern-matching on multiple text fields
I presume you are using ordinary B-tree indexes? These won't work for ilike '%something' (with leading wildcard). You'll need to add other indexes.
Oct
6
comment SQL Server - High Performance Record Comparison
But, in general, for high-performance you'll do better to switch to set-based processing rather than row-by-row, aka slow-by-slow.
Oct
6
comment SQL Server - High Performance Record Comparison
Show us your table definitions and code. Without it we're guessing.
Oct
5
comment Looking to improve query performance
No primary keys?! What about unique keys?
Oct
5
comment Looking to improve query performance
Is it possible to replace union with union all?
Oct
1
comment InnoDB: SELECT COUNT(*) using primary key 25 times slower on Windows
I presume the hardware is roughly equivalent?