473,388 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

searching archives should be a weeeee bit faster ...


I spent this aft enabling debugging on the postmaster side, and determined
that there was a critical index missing on one of the tables ... there was
no index on the url.rec_id field, so a query that looks like:

SELECT rec_id, site_id, pop_rank FROM url WHERE rec_id IN
('31356','31364','32786','32787','32857','32858',' 32871','32872','32873','32874','32877','32878','32 891','32892','32894','32922','32923','32928','3292 9','33003','33004','33030','33090','33091','35
146','37026','37028','39730','44317','44339','4434 8','44359','44413','44420','44438','45314','45322' ,'45861','47914','48756','49587','50564','50567',' 51222','52330','53029','53550','53581','53898'
,'53901','53932','54235','54944','54951','54955',' 54965','54973','55041','55295','55370','55374','55 609','55885','55889','55898','55903','55905','5590 6','55907','56442','57144','57228','57230','57
233','58497','58499','58512','58519','58540','5858 1','58585','59281','59865','59874','60476','60478' ,'60482','60486','60590','60827','61465','61531',' 61778','62272','62585','62602','62609','62731'
,'63933','66733','66740','66743','66747','66758',' 66760','66763','66765','66768','66774','66777','68 100','68191','68195','68212','68213','68257','6826 6','68288','68295','68300','68315','68332','68
335','68349','68354','69422','69435','69446','6944 7','69987','69991','69995','70003','70007','70010' ,'70084','70089','70095','70468','70692','70699',' 70739','71022','74531','74810','77576','77736'
,'78346','78608','79208','79291','79312','79349',' 80034','80038','82203','82852','84155','84456','85 945','86709','87055','87061','87065','87078','8740 6','87413','87518','89229','89740','91262','94
205','94209','94215','94217','94940','96242','9629 5','96303','97442','97827','97833','97854','98262' ,'98845','98846','98847','98848','98849','98850',' 98851','98852','98854','98855','98856','98857'
,'98858','98859','98860','99239','100360','100407' ,'100459','100731','100840','102020','102026','103 782','106017','108523','109645','109654','109667', '109670','111213','111232','111233','111349','
111351','111356','111620','116673','116677','11673 4','117709','117733','118075','118103','122444','1 26754','127945','127949','128132','131062','131066 ','131067','131068','131079','131084','131085'
,'131094','131221','131222','131223','131225','131 226','131227','134426','135465','135466','135468', '135470','137034','137035','137536','142057') ORDER BY rec_id;

was doing a sequence scan over 230k+ records in the URL file each time ...
created the index, and now I can actually get results ~32sec for the
single string (mvcc) that I've been using for testing, instead of it never
seeming to come back ...

hopefully that was the major part of it ...
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #1
4 1170
Is "index" a stop word in the archives? It doesn't seem to return any
results when typing in "index" with anything (ex: index correlation).
FWIW, just a data point. -sc

--
Sean Chittenden

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 11 '05 #2

yes it is/was ...I've just removed it from the list of stop words, but am
not going to force a re-index of 250k URLs ;( So, any new index'ng will
pull in index as a valid search word, and when the current URLs
expire/re-index,they will get pulled in then also ...

On Thu, 4 Sep 2003, Sean Chittenden wrote:
Is "index" a stop word in the archives? It doesn't seem to return any
results when typing in "index" with anything (ex: index correlation).
FWIW, just a data point. -sc

--
Sean Chittenden


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #3
> yes it is/was ...I've just removed it from the list of stop words,
but am not going to force a re-index of 250k URLs ;( So, any new
index'ng will pull in index as a valid search word, and when the
current URLs expire/re-index,they will get pulled in then also ...


Hrm... if I search for "correlation," I get some results. If I search
for "index," I don't get anything (expected), but if I search for
"index correlation," I get nothing. Why isn't it returning the same
results as when I searched for "correlation?"

Just a scratch that I finally had to scratch and ask about...

-sc

--
Sean Chittenden

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #4


On Thu, 4 Sep 2003, Sean Chittenden wrote:
yes it is/was ...I've just removed it from the list of stop words,
but am not going to force a re-index of 250k URLs ;( So, any new
index'ng will pull in index as a valid search word, and when the
current URLs expire/re-index,they will get pulled in then also ...


Hrm... if I search for "correlation," I get some results. If I search
for "index," I don't get anything (expected), but if I search for
"index correlation," I get nothing. Why isn't it returning the same
results as when I searched for "correlation?"

Just a scratch that I finally had to scratch and ask about...


my understanding of how it searches is it defaults to an 'and' ... so it
would have to find all docs that have both index (0) *and* correlation (n)
.... which would equal zero results ...
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 11 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ernest Pianalto | last post by:
Hi, I just joined this list and would like to search the archives before I ask a = question. I there a way to search. Thanks=20 -- MySQL General Mailing List
0
by: Ralph Guzman | last post by:
I have to do a catalog search through multiple tables and columns for product model number, description, and name. I realize that doing pattern matching with multiple LIKE statements is slow so I...
0
by: Joshua Spoerri | last post by:
Which version is targetted for optimization of OR searching on two keys, that is, "select * from sometable where f1 = 123 or f2 = 123", as described in...
33
by: Geoff Jones | last post by:
Hiya I have a DataTable containing thousands of records. Each record has a primary key field called "ID" and another field called "PRODUCT" I want to retrieve the rows that satisy the following...
6
by: David Garamond | last post by:
in oracle 10g, you can issue: ALTER SESSION SET NLS_COMP = ansi; ALTER SESSION SET NLS_SORT = binary_ci; do you think this is an elegant solution for case insensitive sorting & searching? is...
2
by: Richard Brosnahan | last post by:
I hate asking questions that have probably been answered before, but I have not found a way to conveniently search the archives of this mailing list. So... Can someone tell me how to...
8
by: Allan Ebdrup | last post by:
What would be the fastest way to search 18,000 strings of an average size of 10Kb, I can have all the strings in memory, should I simply do a instr on all of the strings? Or is there a faster way?...
2
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
How can I search the archives of this forum? I know there are some old posts that are not showing up in my search. Thanks! Bob
4
by: moswald | last post by:
I've been searching for a specific article for awhile now. About two years ago (maybe longer) there was an article in the C/C++ User's Journal that compared the performances of various stl...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.