[PERFORM] Calling a SP from Curosor loop

2006-07-02 Thread satishchandra999
I have SP, which has a cursor iterations. Need to call another SP for every loop iteration of the cursor. The pseudo code is as follows.. Create proc1 as Begin Variable declrations... declare EffectiveDate_Cursor cursor for select field1,fld2 from tab1,tab2 where tab1.effectivedate

[PERFORM] Sort order in sub-select

2006-07-02 Thread Craig A. James
Here is a subtle question about SQL. I have a one-to-many pair of tables (call them "P" and "C" for parent and child). For each row of P, there are many rows in C with data, and I want to sort P on the min(c.data). The basic query is simple: select p_id, min(data) as m from c group by p_id

[PERFORM] optimizing LIKE '%2345' queries

2006-07-02 Thread Gene
Is there any way to create a reverse index on string columns so that queries of the form: where column like '%2345'; can use an index and perform as fast as searching with like '2345%'? Is the only way to create a reverse function and create an index using the reverse function and modify querie

Re: [PERFORM] FWD: Update touches unrelated indexes?

2006-07-02 Thread Jaime Casanova
>This surprises you why? I don't know anything about how PG stores keys along with their references to the actual rows but my assumption was that that reference is some sort of an index into a table that maps the reference to an actual disk/file address. So even if the row or the page with the ro