473,569 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Async Query Processing on Solaris

I am using Asynchronous Query Processing interface from libpq library.
And I got some strange results on Solaris

My test select query is 'SELECT * from pg_user;'
and I use select system synchronous I/O multiplexer in 'C'

The first test sends 10000 select queries using 10 nonblocking connections
to database ( PQsendQuery ).
The second test sends the same 10000 select queries using 1 connection (
PQexec ).

On FreeBSD there is a huge difference between the async and the sync tests.
The async test is much faster than sync test.
On Solaris there is no speed difference between async and sync test,
actually async test is even slower than sync test.

Q. Why ?

On FreeBSD:

/usr/bin/time ./PgAsyncManager async
async test start ... 10000 done
9.46 real 3.48 user 1.25 sys

/usr/bin/time ./PgAsyncManager sync
sync test start ... 10000 done
22.64 real 3.35 user 1.24 sys

On Solaris:

/usr/bin/time ./PgAsyncManager async
async test start ... 10000 done

real 20.6
user 2.1
sys 0.4

/usr/bin/time ./PgAsyncManager sync
sync test start ... 10000 done

real 18.4
user 1.1
sys 0.5
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #1
0 1814

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

Similar topics

0
370
by: Passynkov, Vadim | last post by:
I am using Asynchronous Query Processing interface from libpq library. And I got some strange results on Solaris My test select query is 'SELECT * from pg_user;' and I use select system synchronous I/O multiplexer in 'C' The first test sends 10000 select queries using 10 nonblocking connections to database ( PQsendQuery ). The second...
1
1799
by: Phil Castle | last post by:
I wonder if anyone can help me with this problem. I have an ODBC/CLI application that runs queries against DB2. In order to allow my users to cancel an active query, I run the SQL statements in async mode. This is done by calling SQLSetStmtAttr with option SQL_ASYNC_ENABLE. This has worked fine for years against all DB2s between V2 and V7....
0
1015
by: Alan Z. Scharf | last post by:
1. I have a set of six async calls to SQLServer2000 SP's. 2. These six SP's run fine in SQLServer Query Analyzer when called from a master SP executing the individual SP's in succession. 3. However, when executing these SP's in async fashion from a web form, the process times out after about 60-65 seconds. The length of the entire...
8
5826
by: TS | last post by:
Im in a web page and call an asynchronous method in business class. the call back method is in the web page. When page processes, it runs thru code begins invoking the method then the page unloads. When the callback method is raised, only the method in the web page is run and the page never refreshes, it seems it all happens on the server...
2
6199
by: Viet | last post by:
I have a couple of questions that hopefully someone could clarify for me. I have an app that uses the threading.timer to constantly poll a scanner to scan in documents. I understand that Async delegates can also be used for polling purposes. Would it be more efficient to use async delegates in this case? Are their any examples on how to use...
1
4310
by: Simon Hart | last post by:
Hi, I thought I'd just open a thread in an attempt to get peoples feelers with regards to multithreading vs Async Web Service processing. Of course Web Services makes it easy to do Async method calling, but what if you are already in a worker thread in a Windows Forms application when doing the web service call. In this case there is no...
0
1246
by: Manfred Braun | last post by:
Hi All, I have a problem reading queue-messages async. My QueueReader has a Start() and a Stop() method and if my app starts, it calls Start(). The problem is, that there are possibly several hundreds of messages in the queue, which I do not want to have processed by the async messagehandler at startup. So in Start(), I create a new thread,...
10
4487
by: Frankie | last post by:
It appears that System.Random would provide an acceptable means through which to generate a unique value used to identify multiple/concurrent asynchronous tasks. The usage of the value under consideration here is that it is supplied to the AsyncOperationManager.CreateOperation(userSuppliedState) method... with userSuppliedState being, more...
3
2679
by: Ryan Liu | last post by:
Will TcpClient.GetStream().Read()/ReadByte() block until at least one byte of data can be read? In a Client/Server application, what does it mean at the end of stream/no more data available? Client could send data once few seconds of minutes. Is there an "end" at all? In a C/S application, if server side call BeginginRead() again in...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7665
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5501
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.