Re: table hangs on a large query

2006-08-16 Thread mos
At 09:43 AM 8/15/2006, Randy Paries wrote: On 8/15/06, mos <[EMAIL PROTECTED]> wrote: At 09:24 AM 8/15/2006, you wrote: >Dan > >thanks for the help >so i will remove the redundant keys >below is the explain plans >but here is the weird part. >I exported the database and imported into a testDB to

Re: table hangs on a large query

2006-08-15 Thread Dan Buettner
I like to run CHECK TABLEs every day ... I have a small perl program that does this for me, which I keep meaning to post for download - today's shaping up to be light, so while I'm thinking about it maybe I'll just do it! Anyway - I agree Mike's suggestion, backup then repair. You could also fir

Re: table hangs on a large query

2006-08-15 Thread Randy Paries
On 8/15/06, mos <[EMAIL PROTECTED]> wrote: At 09:24 AM 8/15/2006, you wrote: >Dan > >thanks for the help >so i will remove the redundant keys >below is the explain plans >but here is the weird part. >I exported the database and imported into a testDB to play with and >the query that was giving me

Re: table hangs on a large query

2006-08-15 Thread mos
At 09:24 AM 8/15/2006, you wrote: Dan thanks for the help so i will remove the redundant keys below is the explain plans but here is the weird part. I exported the database and imported into a testDB to play with and the query that was giving me grief in the previous message returned immediately

Re: table hangs on a large query

2006-08-15 Thread Randy Paries
On 8/14/06, Dan Buettner <[EMAIL PROTECTED]> wrote: Randy, it's possible your indexes are sadly out of date, or corrupted somehow. Can you post the output of EXPLAIN select * from gallery_object where dir = 'dirname'; as well as of EXPLAIN select * from gallery_object where parent_id = 1 and dir

Re: table hangs on a large query

2006-08-14 Thread Dan Buettner
Randy, it's possible your indexes are sadly out of date, or corrupted somehow. Can you post the output of EXPLAIN select * from gallery_object where dir = 'dirname'; as well as of EXPLAIN select * from gallery_object where parent_id = 1 and dir ='dirname' and obj_type = 1 order by order_idx; Als

Re: table hangs on a large query

2006-08-14 Thread Chris
Randy Paries wrote: Hello, I have a table (see below) that has 111599 records in it. When i do a query like select * from gallery_object where dir = 'dirname' Use explain to see if it's using the index: explain select * from it could be that for that particular directory you have a lot o

table hangs on a large query

2006-08-14 Thread Randy Paries
Hello, I have a table (see below) that has 111599 records in it. When i do a query like select * from gallery_object where dir = 'dirname' this query takes a very long time and while the query is going on it locks the entire table so no one else can query it yet a query like select * from galler