how about:
SELECT distinct main.oid,main.* FROM Tickets main
WHERE main.EffectiveId = main.id
AND main.Status != 'deleted'
AND ( main.Type = 'ticket' OR main.Type = 'subticket' )
AND ( main.Queue = '9' )
AND ( main.id = '17417'
OR main.id IN (
SELECT DISTINCT LocalTarget from Links
where
I agree, but it should be a simple rewrite. No?
x IS NULL/IS NOT NULL AND/OR NOT EXISTS
Tom Lane wrote:
Jean-Luc Lachance <[EMAIL PROTECTED]> writes:
If the two statments are functionally equivalent, why can't PG rewrite
the "NOT IN" version into the more efficient "
The real question is:
If the two statments are functionally equivalent, why can't PG rewrite
the "NOT IN" version into the more efficient "NOT EXISTS"?
Frank van Vugt wrote:
L.S.
Could anybody explain why the planner is doing what it is doing?
What could I do to make it easier to choose a better
Here is what i think you can use:
One master table with out duplicates and one anciliary table with
duplicate for the day.
Insert the result of the select from the anciliary table into the master
table, truncate the anciliary table.
select distinct on ( {all the fields except day}) * from table
file. We all know this has been an issue many
times.
Having a different index file structure when the index is not UNIQUE
would help too.
The last page of a non unique index could hold more stats.
Christopher Browne wrote:
>
> [EMAIL PROTECTED] (Jean-Luc Lachance) writes:
> > That&
That's one of the draw back of MVCC.
I once suggested that the transaction number and other house keeping
info be included in the index, but was told to forget it...
It would solve once and for all the issue of seq_scan vs index_scan.
It would simplify the aggregate problem.
Bruno Wolff III wro
You forgot that the original poster's query was:
SELECT * from
This should require a simple table scan. NO need for stats.
Either the table has not been properly vacuumed or he's got seq_scan
off...
JLL
Nick Fankhauser wrote:
>
> > Yes I Analyze also, but there was no need to because it wa
Sorry for the redundant duplication of the repetition.
I should have read the follow-up messages.
Joe Conway wrote:
>
> Jean-Luc Lachance wrote:
> > I am currious. How can you have RAID 1+0 with only 2 drives?
> > If you are thinking about partitioning the drives, won
I am currious. How can you have RAID 1+0 with only 2 drives?
If you are thinking about partitioning the drives, wont this defeate the
purpose?
JLL
Joe Conway wrote:
>
> [...]
> 2 drives, RAID 1+0: WAL
> 2 drives, RAID 1+0: data
> [...]
---(end of broadcast)--