Quantcast
Channel: User Frank Heikens - Database Administrators Stack Exchange
Browsing all 41 articles
Browse latest View live

Comment by Frank Heikens on Continious aggregates (keeping aggregated data in...

Why all the complexity for just a couple of million records? To be honest, I get the impression that the complexity is what makes things slow. Start with some good enough SQL statements and you should...

View Article



Comment by Frank Heikens on PostgreSQL date index

This query doesn't search for anything, it takes all records including everything. Counting all records in a table, isn't the best part of PostgreSQL and we avoid this (for large tables) by maintaining...

View Article

Comment by Frank Heikens on Optimize query with many joins

The current query gets bogged down on tab5 (wonderful name, someone should be fired for this). Without any background of what the query should do, what the data model is and some data, I can only...

View Article

Comment by Frank Heikens on Move row of a table to an inherited table in...

Why do you use inheritance in the first place? It exists, but it also has its limitations and quirks.

View Article

Comment by Frank Heikens on Should we re-run pg_prewarm('table') after data...

Does it solve a problem for you? If so, what is the problem you're facing?

View Article


Comment by Frank Heikens on Update row data with dynamic lag

That's not how a database works since records don't have an order without an order by in your SELECT statement. There is no relation between records if you don't create that relation. It's the...

View Article

Comment by Frank Heikens on Sensible value for autovacuum_cost_delay

The VACUUM part doesn't make sense to me: TRUNCATE rebuilds the table and doesn't need VACUUM and inserting new data won't trigger a VACUUM either, only ANALYZE. What is missing in this picture?

View Article

Comment by Frank Heikens on Optimizing type alignment for table with many of...

Partitioning on the ts-column can make the delete really cheap: Just drop or truncate the partition.

View Article


Comment by Frank Heikens on Optimized count for large table using triggers,...

Without a query, the DDL for all tables and indexes involved and the result from explain(analyze, verbose, buffers, settings) it's impossible to improve the performance of this query. Could you please...

View Article


Comment by Frank Heikens on Why is restored database faster than original?

Did you try VACUUM FULL on the original database? Rewriting all tables to optimize storage. When you use explain, please use explain(analyze, verbose, buffers, settings) to get the whole picture,...

View Article

Comment by Frank Heikens on Why does a query with extra left join work faster?

Could you please share the results from explain (analyze, verbose, buffers, settings) for your SQL statements? You only showed the plan, not the execution of the plan

View Article

Comment by Frank Heikens on Optimize query performance for a filter on col_a...

Could you please share the result from explain(analyze, verbose, buffers, settings) for your SQL statement, the statement itself and the DDL for all tables and indexes involved? All in plain text, as...

View Article

Answer by Frank Heikens for How do I specify that a column should be...

two options: Use the "datatype"SERIAL or create a sequence and use this sequence as a default value for your integer:CREATE SEQUENCE your_seq;CREATE TABLE foo( id int default...

View Article


Answer by Frank Heikens for Are there any good and free tools for managing a...

pgAdmin and psql, those are the tools I use. A PHP-script isn't very usefull for database management, too slow and many problems with transactions: What to do when something goes wrong? Commit or...

View Article

Answer by Frank Heikens for How much could sequential scan gain by GPU?

You'd better ask this question on the hackers mailing list, there has been some debate about this subject in the past. The PostgreSQL developers can tell you much more about...

View Article


Answer by Frank Heikens for Visualization of MySQL/PostgreSQL table structure...

You mean something like SQL Power Architect? The open source version can be found here.

View Article

Answer by Frank Heikens for Small sample database for practicing database...

Take a look at the Dell DVD Store database. It's available for multiple databases, SQL Server included.The Dell DVD Store is an open source simulation of an online ecommerce site with implementations...

View Article


Answer by Frank Heikens for PostgreSQL: reuse of complex intermediate result...

You need an index on test1_id in table test2, that will change things.Seq Scan on test1 t1 (cost=0.00..301450.63 rows=8761 width=12) (actual time=0.108..229.859 rows=8761 loops=1) SubPlan 1 ->...

View Article

Answer by Frank Heikens for New PostgreSQL 9.1 configuration doesn’t work

pg_config_manual.h is not a configuration file, it's part of the source code. After a change in the source code, you have to compile all the code and install the program you just compiled.Changing the...

View Article

Answer by Frank Heikens for Ways to speed up IN queries under PostgreSQL

IN() using many parameters will result in many cases in a sequential table scan. That might be slow, depending on table size and speed of your system.Create a temporary table with all your variables...

View Article
Browsing all 41 articles
Browse latest View live




Latest Images