Received: from gabuzo.meunet (IDENT:root@d224.paris-204.cybercable.fr [212.198.204.224]) by hub.org (8.9.3/8.9.1) with ESMTP id PAA68516 for ; Mon, 26 Apr 1999 15:40:10 -0400 (EDT) (envelope-from christophe.labouisse@dial.oleane.com) Received: (from moi@localhost) by gabuzo.meunet (8.9.1a/8.9.1/Christophe Labouisse - 10/01/99) id VAA06836; Mon, 26 Apr 1999 21:37:47 +0200 To: pgsql-sql@postgreSQL.org Subject: Strange behavior Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: multipart/mixed; boundary="Multipart_Mon_Apr_26_21:37:46_1999-1" Content-Transfer-Encoding: 7bit From: Christophe Labouisse Date: 26 Apr 1999 21:37:46 +0200 Message-ID: Lines: 91 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" --Multipart_Mon_Apr_26_21:37:46_1999-1 Content-Type: text/plain; charset=US-ASCII [It may be a repost, I had a little mess in my mail last weeks, sorry] I tried to make a simple select on a single table and I find some strange results. First of all I execute the following query : => select crit_url from crit where crit_url like 'films/%' order by crit_url; crit_url ------------------------------------- films/7-samurai.html [...] films/victor-pendant-qu-il.html films/violent-cop.html films/wild-things.html (53 rows) Now if it try this one : select crit_url from crit where crit_url like '%films/%' order by crit_url; crit_url ------------------------------------- films/7-samurai.html [...] films/victor-pendant-qu-il.html films/violent-cop.html films/wild-things.html films/y-aura-t-il-de-la-neige.html films/you-ve-got-mail.html#ab films/you-ve-got-mail.html#fvd films/you-ve-got-mail.html#fvd films/you-ve-got-mail.html#thb (58 rows) As you can notice there is 5 more rows in the second query that in the first and, as far as my SQL understanding goes, they should have in the first selection. Since there is an index (partly) on crit_url I tried to remove it but it does change anything. Any idea ? lumiere=> \d crit Table = crit +----------------------------------+----------------------------------+-------+ | Field | Type | Length| +----------------------------------+----------------------------------+-------+ | crit_id | int4 not null default nextval('c | 4 | | films_id | int4 not null | 4 | | crit_texte | text | var | | crit_date | date | 4 | | crit_url | text | var | +----------------------------------+----------------------------------+-------+ Indices: crit_crit_id_key crit_skey lumiere=> \d crit_crit_id_key Table = crit_crit_id_key +----------------------------------+----------------------------------+-------+ | Field | Type | Length| +----------------------------------+----------------------------------+-------+ | crit_id | int4 | 4 | +----------------------------------+----------------------------------+-------+ lumiere=> \d crit_skey Table = crit_skey +----------------------------------+----------------------------------+-------+ | Field | Type | Length| +----------------------------------+----------------------------------+-------+ | films_id | int4 | 4 | | crit_url | text | var | +----------------------------------+----------------------------------+-------+ --Multipart_Mon_Apr_26_21:37:46_1999-1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Christophe Labouisse : Cinéma, typographie, Unix christophe.labouisse@dial.oleane.com http://www.multimania.com/gabuzo/ Le cinéma en Lumière : http://www.lumiere.org/ --Multipart_Mon_Apr_26_21:37:46_1999-1--