Thread: Queries taking a very long time

Queries taking a very long time

From
"Eric Freeman"
Date:
Hi,
I'm using version 7.3.3. I do a lot of modification to some of the tables in my database. There's a table that I didn't
runvacuum on for a while and I ran some big queries on it. It was taking a long time so I aborted the query and tried
runninga vacuum on the table. It ran for around 48 hours before I aborted that. I decided to just drop the table and
re-createit since that seems like it would be the fastest thing. It's been running the drop table command for almost 24
hoursnow. Is there any way to speed this process up? Can I go into the data directory and delete some files?  
This is on a developmental database so losing some data isn't extremely critical but I would like to know what data I'm
losingif I lose data other than just the table. There hasn't been any activity on the database since I started trying
todrop the table.  Make your home warm and cozy this winter with tips from MSN House & Home. 

Re: Queries taking a very long time

From
"Marc G. Fournier"
Date:
On Thu, 8 Jan 2004, Eric Freeman wrote:

>
> Hi,
>
> I'm using version 7.3.3. I do a lot of modification to some of the
> tables in my database. There's a table that I didn't run vacuum on for a
> while and I ran some big queries on it. It was taking a long time so I
> aborted the query and tried running a vacuum on the table. It ran for
> around 48 hours before I aborted that. I decided to just drop the table
> and re-create it since that seems like it would be the fastest thing.
> It's been running the drop table command for almost 24 hours now. Is
> there any way to speed this process up? Can I go into the data directory
> and delete some files?

Have you checked logs to make sure that its not issuing errors?  Is the
DROP process doing anything?  All DROP TABLE does is rm the appropriate
files on teh file system and update various system tables to remove
references to it ... how big is this file, that its taking >24hrs to
*delete* it from the file system?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664

Re: Queries taking a very long time

From
Richard Huxton
Date:
On Thursday 08 January 2004 16:15, Eric Freeman wrote:

Please try not to post in html

> <P>I'm using version 7.3.3. I do a lot of modification to some of the
> tables in my database. There's a table that I didn't run vacuum on for a
> while and I ran some big queries on it. It was taking a long time so I
> aborted the query and tried running a vacuum on the table. It ran for
> around 48 hours before I aborted that. I decided to just drop the table and
> re-create it since that seems like it would be the fastest thing. It's been
> running the drop table command for almost 24 hours now. Is there any way to
> speed this process up?

What's the issue - CPU saturated? Disk saturated? system swapping?

Possibly your best bet is to copy the data out of the table, TRUNCATE it then
recreate it.

--
  Richard Huxton
  Archonet Ltd