Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 4th, 2012, 07:38 AM
jdgower jdgower is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2010
Posts: 70 jdgower User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 29 m 22 sec
Reputation Power: 3
Database (dbase IV) Query too slow, anything I can do to speed it up?

I have a database I'm querying using a DSN-less ADODB connection (have tried DSN, pretty much same result, DSN-less seems a tad bit faster).

Anyhow, I am querying a dbase IV database with several NDX files. I have them setup correctly in an inf file (I know it's done correctly because the NDX files are now updated correctly when doing an insert).

The problem is that the page takes too long to load. It takes about 7 seconds to perform the query and during that time the server's CPU is at 100%, making other requests wait.

My query looks like:

Code:
$attach_query="SELECT ATCHDATE, FILENAME, CATEGORY, DESC FROM attach WHERE REC='$code'";


and I'm using odbc_exec on that query (also, doing this in PHP)

The strange thing is, whether I have the inf file with the ndx files in it - it has no effect on the speed of the query...However, the inserts I have do not work fully unless the inf is there (I am connecting to the databases of an application we use at work).

There are about 1.6 million records in the database, when i count(*) the rows as 425750 so thats another reason i know the ndx files are working (thats what opening the dbf in access says when the inf is present) - is there anything else I can do to speed up this query?

Thanks you in advance for any advice!

Last edited by jdgower : August 4th, 2012 at 07:58 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Database (dbase IV) Query too slow, anything I can do to speed it up?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap