DevHeads.net

Postings by Marcus Engene

planner, *_collapse_limit

Hi,

I've read a little bit about join_collapse_limit and from_collapse_limit
and I see their reason to exist.

A stupid question: in algorithms 101 you're usually told to make a chess
program and then you usually do a width first min max tree.

odd planner again, pg 9.0.8

Hi,

Lacking index hints I have a bit of a problem with a slow select.

select
pic.objectid as pic_objectid
,pu.objectid as pu_objectid
,ppcr.preproc_me as pul_preproc_me
,pp.price_amount as pp_price_amount
,pim.aut_item_container as pim_aut_item_container
,COALESCE((select coalesce(pcg.name_preferred, pcg.name) from
codec_gfx pcg where pcg.objectid = pim.aut_codec_gfx), 'unknown') as
pcg_name
,COALESCE((select pis.name from item_snd pis where pis.objectid =
pim.aut_codec_snd), 'unknown') as pis_name
-- ,(select pii2.price_arr from item_image

WAL in RAM

Hi list,

Every now and then I have write peaks which causes annoying delay on my
website. No particular reason it seems, just that laws of probability
dictates that there will be peaks every now and then.

Anyway, thinking of ways to make the peaks more bareable, I saw the new
9.1 feature to bypass WAL. Problems is mainly that some statistics
tables ("x users clicked this link this month") clog the write cache,
not more important writes.

bitmask index

Hi list,

I use Postgres 9.0.4.

I have some tables with bitmask integers. Set bits are the interesting
ones.

wildcard makes seq scan on prod db but not in test

Dear list,

I have a table with a few million rows and this index:
CREATE INDEX bond_item_common_x7 ON bond_item_common
((lower(original_filename)));

There are about 2M rows on bonddump and 4M rows on bond90.

bonddump is on a 8MB RAM machine, bond90 is on a 72MB RAM machine.

The table is analyzed properly both places.

I'm an index hint zealot, but aware of our different stances in the
matter. :)

Dropping the wildcard for the like, both databases uses the index.

Is there a way to convince Postgres to try not to do full table scan as
much?

varchar lengths

Hi list,

In Oracle I can...
create table a
(
b varchar2(10 chars)
);
...and then, regardless of character encoding and how much space an
ascii character vs a รถ takes, 10 characters will fit there.

If I do say a web-thing in php I have to do horrors like...
if (10 < mb_strlen ($b, '8bit'))
{
// fail to explain to the user why it's too long
}

I could be liberal with the length and instead do a...
create table a
(
b varchar(40)
);
...but I like constraints and this isn't a mysql list so I don't have to
motivate that.

Is there anything I've misunderstood?