pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedUsing LIKE expression problem..
6+ messages / 3 participants
[nested] [flat]
* Using LIKE expression problem..
@ 2004-05-12 06:18 Michael Ryan S. Puncia <mpuncia@census.gov.ph>
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ryan S. Puncia @ 2004-05-12 06:18 UTC (permalink / raw)
To: pgsql-performance
Hi everybody..
Before anything else I would like to thank all those person who answers
my previous question. again thank you very much
This is my question .
In my query .. Select * from table1 where lastname LIKE 'PUNCIA%'..
In the query plan ..it uses seq scan rather than index scan .. why ? I have
index on lastname, firtname.
Thanks
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Using LIKE expression problem..
@ 2004-05-12 06:48 Christopher Kings-Lynne <chriskl@familyhealth.com.au>
parent: Michael Ryan S. Puncia <mpuncia@census.gov.ph>
0 siblings, 1 reply; 6+ messages in thread
From: Christopher Kings-Lynne @ 2004-05-12 06:48 UTC (permalink / raw)
To: Michael Ryan S. Puncia <mpuncia@census.gov.ph>; +Cc: pgsql-performance
> In the query plan ..it uses seq scan rather than index scan .. why ? I
> have index on lastname, firtname…
Have you run VACUUM ANALYZE; on the table recently?
Chris
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Using LIKE expression problem..
@ 2004-05-12 07:46 Michael Ryan S. Puncia <mpuncia@census.gov.ph>
parent: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ryan S. Puncia @ 2004-05-12 07:46 UTC (permalink / raw)
To: 'Christopher Kings-Lynne' <chriskl@familyhealth.com.au>; 'Michael Ryan S. Puncia' <mpuncia@census.gov.ph>; +Cc: pgsql-performance
Yes , I already do that but the same result .. LIKE uses seq scan
-----Original Message-----
From: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Christopher
Kings-Lynne
Sent: Wednesday, May 12, 2004 2:48 PM
To: Michael Ryan S. Puncia
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Using LIKE expression problem..
> In the query plan ..it uses seq scan rather than index scan .. why ? I
> have index on lastname, firtname.
Have you run VACUUM ANALYZE; on the table recently?
Chris
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Using LIKE expression problem..
@ 2004-05-12 07:59 Christopher Kings-Lynne <chriskl@familyhealth.com.au>
parent: Michael Ryan S. Puncia <mpuncia@census.gov.ph>
0 siblings, 1 reply; 6+ messages in thread
From: Christopher Kings-Lynne @ 2004-05-12 07:59 UTC (permalink / raw)
To: Michael Ryan S. Puncia <mpuncia@census.gov.ph>; +Cc: pgsql-performance
Are you in a non-C locale?
Chris
Michael Ryan S. Puncia wrote:
> Yes , I already do that but the same result .. LIKE uses seq scan
>
> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org
> [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Christopher
> Kings-Lynne
> Sent: Wednesday, May 12, 2004 2:48 PM
> To: Michael Ryan S. Puncia
> Cc: pgsql-performance@postgresql.org
> Subject: Re: [PERFORM] Using LIKE expression problem..
>
>
>>In the query plan ..it uses seq scan rather than index scan .. why ? I
>>have index on lastname, firtname.
>
>
> Have you run VACUUM ANALYZE; on the table recently?
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Using LIKE expression problem..
@ 2004-05-12 08:17 Michael Ryan S. Puncia <mpuncia@census.gov.ph>
parent: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ryan S. Puncia @ 2004-05-12 08:17 UTC (permalink / raw)
To: 'Christopher Kings-Lynne' <chriskl@familyhealth.com.au>; 'Michael Ryan S. Puncia' <mpuncia@census.gov.ph>; +Cc: pgsql-performance
Sorry .. I am a newbie and I don't know :(
How can I know that I am in C locale ?
How can I change my database to use C locale?
-----Original Message-----
From: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Christopher
Kings-Lynne
Sent: Wednesday, May 12, 2004 3:59 PM
To: Michael Ryan S. Puncia
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Using LIKE expression problem..
Are you in a non-C locale?
Chris
Michael Ryan S. Puncia wrote:
> Yes , I already do that but the same result .. LIKE uses seq scan
>
> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org
> [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Christopher
> Kings-Lynne
> Sent: Wednesday, May 12, 2004 2:48 PM
> To: Michael Ryan S. Puncia
> Cc: pgsql-performance@postgresql.org
> Subject: Re: [PERFORM] Using LIKE expression problem..
>
>
>>In the query plan ..it uses seq scan rather than index scan .. why ? I
>>have index on lastname, firtname.
>
>
> Have you run VACUUM ANALYZE; on the table recently?
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Using LIKE expression problem..
@ 2004-05-19 02:51 Joseph Shraibman <jks@selectacast.net>
parent: Michael Ryan S. Puncia <mpuncia@census.gov.ph>
0 siblings, 0 replies; 6+ messages in thread
From: Joseph Shraibman @ 2004-05-19 02:51 UTC (permalink / raw)
To: Michael Ryan S. Puncia <mpuncia@census.gov.ph>
Use the text_pattern_ops operator when creating the index, see:
http://www.postgresql.org/docs/7.4/static/indexes-opclass.html
Michael Ryan S. Puncia wrote:
> Sorry .. I am a newbie and I don't know :(
> How can I know that I am in C locale ?
> How can I change my database to use C locale?
>
>
>
> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org
> [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Christopher
> Kings-Lynne
> Sent: Wednesday, May 12, 2004 3:59 PM
> To: Michael Ryan S. Puncia
> Cc: pgsql-performance@postgresql.org
> Subject: Re: [PERFORM] Using LIKE expression problem..
>
> Are you in a non-C locale?
>
> Chris
>
> Michael Ryan S. Puncia wrote:
>
>
>>Yes , I already do that but the same result .. LIKE uses seq scan
>>
>>-----Original Message-----
>>From: pgsql-performance-owner@postgresql.org
>>[mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Christopher
>>Kings-Lynne
>>Sent: Wednesday, May 12, 2004 2:48 PM
>>To: Michael Ryan S. Puncia
>>Cc: pgsql-performance@postgresql.org
>>Subject: Re: [PERFORM] Using LIKE expression problem..
>>
>>
>>
>>>In the query plan ..it uses seq scan rather than index scan .. why ? I
>>>have index on lastname, firtname.
>>
>>
>>Have you run VACUUM ANALYZE; on the table recently?
>>
>>Chris
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 7: don't forget to increase your free space map settings
>>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2004-05-19 02:51 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-12 06:18 Using LIKE expression problem.. Michael Ryan S. Puncia <mpuncia@census.gov.ph>
2004-05-12 06:48 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2004-05-12 07:46 ` Michael Ryan S. Puncia <mpuncia@census.gov.ph>
2004-05-12 07:59 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2004-05-12 08:17 ` Michael Ryan S. Puncia <mpuncia@census.gov.ph>
2004-05-19 02:51 ` Joseph Shraibman <jks@selectacast.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox