Queries taking a very long time

Started by Eric Freemanover 22 years ago3 messagesgeneral
Jump to latest
#1Eric Freeman
ejf7@hotmail.com

<html><div style='background-color:'><DIV class=RTE>
<P>Hi,</P>
<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? Can I go into the data directory and delete some files? </P>
<P>This is on a developmental database so losing some data isn't extremely critical but I would like to know what data I'm losing if I lose data other than just the table. There hasn't been any activity on the database since I started trying to drop the table. <BR><BR></P></DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMAENUS/2749??PS=&quot;&gt;Make your home warm and cozy this winter with tips from MSN House & Home. </a> </html>

#2The Hermit Hacker
scrappy@hub.org
In reply to: Eric Freeman (#1)
Re: Queries taking a very long time

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

#3Richard Huxton
dev@archonet.com
In reply to: Eric Freeman (#1)
Re: Queries taking a very long time

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