If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Bad queries

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-05-06, 13:14
mgregoire mgregoire is offline
Registered User
 
Join Date: Oct 2006
Posts: 1
Bad queries

Can anyone recommend a method whereby malformed queries executed against a PSQL table without using an index can be prevented? Execution of these queries causes serious slow downs on our server.

For example, a user writes a query without using an index. Or, uses a 'like %' in a query searching for text in a field without indexing.

Tasering the users hasn't worked so I'd like to cut em off at the source.

Matthew.
Reply With Quote
  #2 (permalink)  
Old 10-05-06, 14:09
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
About the only way you're going to prevent users from writing malformed queries is to prevent them from running any query except approved queries.
Now, if they are using the same query often and it doesn't have an index to use, I would suggest creating the index.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On