473,407 Members | 2,598 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,407 software developers and data experts.

default select ordering

Please accept my apologies if this is answered elsewhere in the archives
or docs but I have searched without luck.

I've always assumed that default ordering of selects are based on a first
in first out principle and that this remains true at the row level despite
edits to columns.

However I'm dealing with a case where this doesn't seem to hold true. The
ordering has changed over time. Its difficult for me to gauge whether the
data has been moved around with pg_dump or whether optimisation/vacuum
commands have been called but I'm wondering if either of these things
could effect the first in first out ordering and if there's any system
tables or configerations that I can use to either verify or prevent this.

Any help greaty appreciated.

Matt Roberts

---------------------------(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 23 '05 #1
1 5581
Matt Roberts <ma**@runtime-collective.com> writes:
Please accept my apologies if this is answered elsewhere in the archives
or docs but I have searched without luck.

I've always assumed that default ordering of selects are based on a first
in first out principle and that this remains true at the row level despite
edits to columns.


There is no guaranteed ordering of rows without an ORDER BY clause.
VACUUM will change the row ordering as it moves tuples around to free
up space. If you want a guaranteed order, use a key field and ORDER BY.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #2

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

Similar topics

1
by: Jeff Thies | last post by:
I have 10 select boxes, they have select values of 1 to 10 (one of each value). I'd like to be able to change one of the select boxes and have the rest reorder themselves accordingly. I...
4
by: adam | last post by:
hello I have strange problem. I write to MySQL data to table with one column of varchar(8000). I write 750000 bytes, so it get 93 records of 8000 bytes and the last - 6000bytes. but what is...
3
by: Cindy | last post by:
OK, I have the following table: create table citations_by_level ( aid smallint, wid smallint, v_level varchar(50), w_level varchar(50), x_level varchar(50), y_level varchar(50),
5
by: Mike Nolan | last post by:
I notice that 7.4 doesn't do default ordering on a 'group by', so you have to throw in an 'order by' clause to get the output in ascending group order. Is this something that most RDB's have...
26
by: GreatAlterEgo | last post by:
Hi, This is my query which is embedded in a COBOL program. EXEC SQL SELECT DATE, AGE, DURATION, AMT INTO :LDATE, :L.AGE, :L.DURATION, :L.AMT FROM TAB1 WHERE CODE = :KEY.CODE AND...
1
by: evanburen | last post by:
When my page loads, I check for the existence of a cookie value through readCookie(). If there is a value present for the cookie, I would like that to be the default value in function ordering()...
17
by: glenn.robinson | last post by:
Hello, DB2 for iSeries - V5R2 I have a table with a non-unique index, column name SEDOL. I need to extract the 2nd row from each set of SEDOL rows in the table. If only one SEDOL row exists...
48
by: Jimmy | last post by:
thanks to everyone that helped, unfortunately the code samples people gave me don't work. here is what i have so far: <% Dim oConn, oRS, randNum Randomize() randNum = (CInt(1000 * Rnd) + 1) *...
0
by: twinklyblue | last post by:
Hi The Scripts team, I would like to ask how oracle handles ordering of japanese characters? I have used order by in my select statement but is not sure if it displays the correct ordering. ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.