View Single Post
cstreit cstreit is offline
Super Moderator
 
cstreit's Avatar
 
Join Date: Feb 2000
Location: Naperville, IL USA
Posts: 14,963
Garage
Wayne... Often when there is not a proper index on a table, it will build temporary versions of it (smaller) to do full table scans or build temp indexes.

I don't know what db you are using, but temp tablespaces are also used in sorting activity as well, also related to indexes.

In this case the query is SELECT DISTINCT post.userid,
thread.threadid,thread.threadid So you could try adding an index on Post.userid and Thread.threadid.?

THat's a weird query though, because it selects threadid twice...
__________________
Chris
----------------------------------------------

1996 993 RS Replica
2023 KTM 890 Adventure R
1971 Norton 750 Commando
Alcon Brake Kits
Old 02-27-2003, 07:32 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #2 (permalink)