niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Oracle
LIKE performance
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
DA Morgan
*nix forums Guru


Joined: 06 Mar 2005
Posts: 1042

PostPosted: Fri Feb 25, 2005 1:05 am    Post subject: Re: LIKE performance Reply with quote

lh wrote:

Quote:
"GreyBeard" <Fuzzy.GreyBeard@gmail.com> wrote in message
news:pan.2005.02.25.00.48.10.865706@gmail.com...

On Fri, 25 Feb 2005 09:43:15 +1000, lh wrote:


Depending on the version of Oracle, and the frequency of the specific
query, you might consider a funcion based index.

However, you leave us with far too little info to go beyond smarmy
guesses.

FGB


My smarmy apologies your Greybeardness.

Sorry 'bout that. I never should type what I'm thinking <g

Oracle 8i, the query is executed in a loop, the function is reading
directories for files then checking the table to check that the file has
been logged. The function is run regularly and with 10s of thousands of
files it is taking way too long. This query is the bottleneck with a
few seconds per query the current time. So I need a faster way to check
for filenames in the table.

Whatcha doing with the files? IOW, is there a way that intermedia could
help you, or the content management SDK?

As a first shot, though, I'd try a fbi.

FGB


I did experiment with substr as an index, but it doesn't seem to use the
index after i add it. It just does a table scan.

Why is that a problem?

Is there a measured performance issue? If so what is it?
Are your statistics current? Created how?
What percentage of the rows are being retrieved?
What is the cardinality?
etc. etc.

The fact that an index is not being used might mean nothing more than
that not using the index is appropriate.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Back to top
GreyBeard
*nix forums Guru Wannabe


Joined: 10 Mar 2005
Posts: 182

PostPosted: Fri Feb 25, 2005 12:56 am    Post subject: Re: LIKE performance Reply with quote

On Fri, 25 Feb 2005 10:21:13 +1000, lh wrote:

Quote:

I did experiment with substr as an index, but it doesn't seem to use the
index after i add it. It just does a table scan.

Is the substr the only component in your where clause, or are there
additional predicates?

I'd also recommend reading "Practical Oracle8i" by Jonathan Lewis and
following some of the advice.

Finally, is there any way you could attempt a test with a more recent
version, say 9iR2 or (pref) 10g? There have been a good number of
advances that should help.

FGB
Back to top
lh
*nix forums beginner


Joined: 18 Apr 2005
Posts: 7

PostPosted: Thu Feb 24, 2005 11:21 pm    Post subject: Re: LIKE performance Reply with quote

"GreyBeard" <Fuzzy.GreyBeard@gmail.com> wrote in message
news:pan.2005.02.25.00.48.10.865706@gmail.com...
Quote:
On Fri, 25 Feb 2005 09:43:15 +1000, lh wrote:


Depending on the version of Oracle, and the frequency of the specific
query, you might consider a funcion based index.

However, you leave us with far too little info to go beyond smarmy
guesses.

FGB


My smarmy apologies your Greybeardness.

Sorry 'bout that. I never should type what I'm thinking <g

Oracle 8i, the query is executed in a loop, the function is reading
directories for files then checking the table to check that the file has
been logged. The function is run regularly and with 10s of thousands of
files it is taking way too long. This query is the bottleneck with a
few seconds per query the current time. So I need a faster way to check
for filenames in the table.

Whatcha doing with the files? IOW, is there a way that intermedia could
help you, or the content management SDK?

As a first shot, though, I'd try a fbi.

FGB

I did experiment with substr as an index, but it doesn't seem to use the
index after i add it. It just does a table scan.
Back to top
GreyBeard
*nix forums Guru Wannabe


Joined: 10 Mar 2005
Posts: 182

PostPosted: Thu Feb 24, 2005 10:47 pm    Post subject: Re: LIKE performance Reply with quote

On Fri, 25 Feb 2005 09:43:15 +1000, lh wrote:

Quote:

Depending on the version of Oracle, and the frequency of the specific
query, you might consider a funcion based index.

However, you leave us with far too little info to go beyond smarmy
guesses.

FGB


My smarmy apologies your Greybeardness.

Sorry 'bout that. I never should type what I'm thinking <g>

Quote:
Oracle 8i, the query is executed in a loop, the function is reading
directories for files then checking the table to check that the file has
been logged. The function is run regularly and with 10s of thousands of
files it is taking way too long. This query is the bottleneck with a
few seconds per query the current time. So I need a faster way to check
for filenames in the table.

Whatcha doing with the files? IOW, is there a way that intermedia could
help you, or the content management SDK?

As a first shot, though, I'd try a fbi.

FGB
Back to top
lh
*nix forums beginner


Joined: 18 Apr 2005
Posts: 7

PostPosted: Thu Feb 24, 2005 10:43 pm    Post subject: Re: LIKE performance Reply with quote

Quote:

Depending on the version of Oracle, and the frequency of the specific
query, you might consider a funcion based index.

However, you leave us with far too little info to go beyond smarmy
guesses.

FGB


My smarmy apologies your Greybeardness.

Oracle 8i, the query is executed in a loop, the function is reading
directories for files then checking the table to check that the file has
been logged. The function is run regularly and with 10s of thousands of
files it is taking way too long. This query is the bottleneck with a few
seconds per query the current time. So I need a faster way to check for
filenames in the table.
Back to top
GreyBeard
*nix forums Guru Wannabe


Joined: 10 Mar 2005
Posts: 182

PostPosted: Thu Feb 24, 2005 10:29 pm    Post subject: Re: LIKE performance Reply with quote

On Fri, 25 Feb 2005 09:25:28 +1000, lh wrote:

Quote:
I have a table with about 30000 rows, one column is a varchar2(90). I'm
doing a LIKE 'XXX%' query and its not using an index.

I tried querying with substr(col, 1, 10) = 'XXXXXXXXXX' with an index on
substr(col, 1, 10). It doesn't use the index, even with a hint.

Whats the best way to get good performance out of this type of query.

TIA


LH

Depending on the version of Oracle, and the frequency of the specific
query, you might consider a funcion based index.

However, you leave us with far too little info to go beyond smarmy guesses.

FGB
Back to top
lh
*nix forums beginner


Joined: 18 Apr 2005
Posts: 7

PostPosted: Thu Feb 24, 2005 10:25 pm    Post subject: LIKE performance Reply with quote

I have a table with about 30000 rows, one column is a varchar2(90). I'm
doing a LIKE 'XXX%' query and its not using an index.

I tried querying with substr(col, 1, 10) = 'XXXXXXXXXX' with an index on
substr(col, 1, 10). It doesn't use the index, even with a hint.

Whats the best way to get good performance out of this type of query.

TIA


LH
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
The time now is Wed Jan 07, 2009 8:38 pm | All times are GMT
navigation Forum index » Databases » Oracle
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Performance and Consistency ?? likun.navipal@gmail.com Berkeley DB 4 Fri Jul 21, 2006 4:24 am
No new posts AIX performance tuning jpzhai@gmail.com AIX 5 Fri Jul 21, 2006 2:27 am
No new posts Performance problem News AIX 1 Wed Jul 19, 2006 9:55 am
No new posts Antw: Performance problem with query Christian Rengstl PostgreSQL 10 Tue Jul 18, 2006 6:24 pm
No new posts performance considerations (looong) Pavel Stratil Apache 2 Tue Jul 18, 2006 3:14 pm

Buy Anything On eBay | Problem Mortgage | Links of Movies | Ringtone | Myspace Backgrounds
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2107s ][ Queries: 20 (0.1190s) ][ GZIP on - Debug on ]