Sorting the returned 30 000 records maybe takes 3-4 seconds? /Jonas
On 12/2/07, Ofir Neuman <[EMAIL PROTECTED]> wrote: > Hi All, > > I have some performance problem when adding ORDER BY to my query, hope you > can help me speed things up. > > This is my table: > > TABLE1 > { > ID TEXT > ParentID TEXT > ModifiedDate INTEGER > } > > ID is the PK of the table and i also have an index on ParentID. > Current number of records in table: 40,000 > > My query is very simple: > SELECT ID FROM Table1 WHERE ParentID = '{FFFF-FFFF-FFFF-FFFF}' ORDER BY > ModifiedDate > > According to the data in my table this query should return 30,000 records. > > While using ORDER BY it takes 3-4 SEC to retrieve the query result, without > the ORDER BY it take something like 30 ms. > > Tried to index also 'ModifiedDate' but it didn't help. > > What am i doing wrong? > > Thanks, > Ofir Neuman. > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------