Re: [SQL] Slow self-join on a 100 million record table

2003-01-02 Thread Paul Thornett
I've played with this quite a lot on a fairly similar machine to yours - i.e. Dual pentium III 700s, 5x4.5Gb 10k Scsi disks Hardware Raid0, 1 Gb. Ram, Windows 2000 Professional (SP3), Sql Server 2000 Desktop (SP2). As expected my elapse times are almost exactly twice as long as yours. I created my

Re: [SQL] Slow self-join on a 100 million record table

2003-01-01 Thread Tom Lane
[EMAIL PROTECTED] (Mark Davies) writes: > The problem is, the self-join solution is extremely slow. I have a > SQL Server 7.0 database with a clustered index on TheWord (sequential > words) and a normal index on TheID. Kindly do not pester Postgres mailing lists with SQL Server questions.

Re: [SQL] Slow self-join on a 100 million record table

2003-01-01 Thread Andrew J. Kelly
Mark, I doubt very much you will ever get much faster results (without increasing hardware) in a situation such as that. Your queries don't look selective enough to effectively use the indexes. What is the query plan for each of the individual selects and what does it look like as a whole? How

[SQL] Slow self-join on a 100 million record table

2003-01-01 Thread Mark Davies
I have a database containing 100 million records, in which each record contains (in sequence) all of the words in a 100 million word collection of texts. There are two columns: TheID (offset value) and TheWord (sequential words), e.g.: TheID TheWord - 1 I 2 saw 3 the 4 man 5