English 中文(简体)
6. Derby 排序次优化问题
原标题:Derby s subquery optimization issue

here is to follow my previous question on Derby. I finally got it to show me the execution plan for my query and intresting values came up: http://pastebin.com/wQAicPAV (SO parser goes crazy so i need to use external storage)

As you can see, some optimizer costs are INCREDIBLY BIG, and estimate row count too. optimizer estimated row count: 333734973.00 optimizer estimated cost: 205150563.85 Completely wrong values. And the query takes 22 minutes to execute.

I ve seen this issue: https://issues.apache.org/jira/browse/DERBY-1905

这表明,大多数时间最优化者只是试图为这一询问找到最佳计划,而执行本身则大大低于预期。

So my question is - how to avoid this situation? Configure derby may be? Optimizer hints? Set timeout for that greedy basterd optimizer? I cant find anything about it in reference and i have no experience with derby at all.

问题回答

从我召集的各位来看,只有重新撰写问询才可以避免,因为最优化者就是“恶意”这种质问——有时会帮助使用初专干事,或从询问的某些部分中产生看法,并使用询问中的人。

Some general performance advice (not sure you already tried that):





相关问题
Optimizing a LAN server for a game

I m the network programmer on a school game project. We want to have up to 16 players at once on a LAN. I am using the Server-Client model and am creating a new thread per client that joins. ...

SQL Table Size And Query Performance

We have a number of items coming in from a web service; each item containing an unknown number of properties. We are storing them in a database with the following Schema. Items - ItemID - ...

Most optimized way to store crawler states?

I m currently writing a web crawler (using the python framework scrapy). Recently I had to implement a pause/resume system. The solution I implemented is of the simplest kind and, basically, stores ...

Do bitwise operations distribute over addition?

I m looking at an algorithm I m trying to optimize, and it s basically a lot of bit twiddling, followed by some additions in a tight feedback. If I could use carry-save addition for the adders, it ...

Improve INSERT-per-second performance of SQLite

Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts per second to over 96,000 inserts per second! Background: We are using SQLite as part of a desktop ...

Profiling Vim startup time

I’ve got a lot of plugins enabled when using Vim – I have collected plugins over the years. I’m a bit fed up with how long Vim takes to start now, so I’d like to profile its startup and see which of ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签