Reputation
8,292
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 18 43
Newest
 Informed
Impact
~406k people reached

10h
comment How to partition existing table in postgres?
@EvanAppleby DELETE FROM ONLY master_table is the solution.
15h
comment How to partition existing table in postgres?
I second what @a_horse_with_no_name said. Otherwise, the first method is much easier and cleaner in my view.
16h
comment How do I keep a postgres table up to date using instagrams api?
You will have to write a script, I'm afraid.
Jul
3
comment Mysql high cpu usage - cpanel
Why, is anything wrong?
Jul
3
comment Implication of owned schemas for a user having db_owner privilege
Where is SQL involved here? Would you mind to name the RDBMS and the GUI you are using?
Jul
3
comment Does PostgreSQL support online schema modification (DDL)?
Yes, the SET NOT NULL can be a pain, just like creating foreign keys (and maybe other operations, too).
Jul
3
comment Does PostgreSQL support online schema modification (DDL)?
To my understanding, adding a new column in MySQL means creating a temporary copy of the table, applying concurrent changes to it and then putting it into the place of the old one. In contrast, adding a new column in PostgreSQL is practically a change in the catalog - not online in the strict sense of the word, but if done carefully causing only minimal disturbance through the exclusive lock. So, from a practical point of view, postgres has been already there for quite a long time...
Jul
3
comment Like operator in postgresql
You forgot to show what you want to compare to what.
Jul
2
comment Postgres 9.1.6 Error index contains unexpected zero page at block 0
No, not really - it's just a habit of quite a few contributors here to point this out.
Jul
2
comment Postgres 9.1.6 Error index contains unexpected zero page at block 0
Do you plan to upgrade to something younger? There are five newer major versions since 8.3 (which does not get any security or other updates since quite a while).
Jul
2
comment PostgreSQL database connection time
I am not sure how this answers a question which is basically unclear at the moment (see my comment above). How do you get any information from pg_stat_activity about the time needed for opening a connection?
Jul
2
comment PostgreSQL database connection time
What do you mean exaclty? Who tries to connect where?
Jul
2
comment Sum of points and rank according to points
Do you really call your tables table1 and so on? Anyway, showing some example data and the wrong output (with the wrong query) could help a lot in getting an answer. Otherwise, it's just guesswork (already done by @JamesAnderson) to figure out what the odd behaviour can mean.
Jul
1
comment PostgreSQL becomes very slow after heavy utilization
If you don't restart the DB, does it stay around 4 tps? Or does it climb up to 56 slowly?
Jul
1
comment Is there a way to determine if a postgres function depends on a user-defined type?
@CraigRinger consider this: show check_function_bodies ; => on, but: CREATE FUNCTION a(p_a integer) RETURNS void LANGUAGE plpgsql AS $$ BEGIN PERFORM 'elekdsnj'::enumtype; END; $$; succeeds while the type enumtype does not exist.
Jul
1
comment Optimization for query n increase performance
This does not look valid SQL to me (because of the double quotes). Which RDBMS is this? And how would you expect anybody to help improving the performance without telling how your present query performs? So, please include the real query, table and index definitions, and an execution plan that shows that this is inefficient.
Jul
1
comment Is there a way to determine if a postgres function depends on a user-defined type?
What do you mean by 'uses'? If it is a return or parameter type, the creation throws an error. If it is used in a cast (for example) in a SQL function, it also throws an error. However, there are chances that your types can hide in PL/pgSQL functions, causing only a runtime error. Not to mention dynamically built commands... Finding these cases is really not simple, you have to parse your function body.
Jul
1
comment Creating a unique index on a materialized view with no unique columns?
Exactly. Later, if you experience problems, you may think about other approaches, but I think this will not happen.
Jun
30
comment Postgres 9.4+: JSONB instead of EAV
I'd suggest just putting together both versions, insert a decent amount of data into both and do some tests.
Jun
30
comment Minimizing SELECT latency in PostgreSQL
You may want to redact your post ;)