473,396 Members | 1,942 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,396 software developers and data experts.

MMAP extension for PHP5

Is there such a thing? I need a good pager for Oracle RDBMS which will
not re-execute the same query gazillion times. In order to do that, I
plan on writing query results to a file and then map the file to an
array. In order for the whole thing to work reasonably fast, I need
something similar to mmap - therefore the question. I need to map large
chunk of disk space to memory and do it fast. Any ideas?
--
Mladen Gogala
http://www.mgogala.com
Jul 18 '06 #1
3 3981
Mladen Gogala wrote:
Is there such a thing? I need a good pager for Oracle RDBMS which will
not re-execute the same query gazillion times. In order to do that, I
plan on writing query results to a file and then map the file to an
array. In order for the whole thing to work reasonably fast, I need
something similar to mmap - therefore the question. I need to map large
chunk of disk space to memory and do it fast. Any ideas?
Is the Oracle off limits? I mean, having/creating tables for the
temporary query result, which you subsequently select from. You'll
need to clean up at some point afterwards, but I reckon you need some
mechanism for that anyway.

--
/Bent
Jul 18 '06 #2
On Wed, 19 Jul 2006 01:30:03 +0200, Bent Stigsen wrote:
Is the Oracle off limits? I mean, having/creating tables for the
temporary query result,
No, Oracle isn't off limits.
which you subsequently select from. You'll
need to clean up at some point afterwards, but I reckon you need some
mechanism for that anyway.
Problem with paging in Oracle is this: if you want to page the output of
a query, you have to execute it over and over again and discard all except
the few rows. That's wasteful and slow. Trick to do that would be to
open a temporary file and map it to memory as an array. My question is: is
there a way to do mmap in PHP5? Thanks to anyone who might help me with an
answer.

--
http://www.mgogala.com

Jul 19 '06 #3
Mladen Gogala wrote:
On Wed, 19 Jul 2006 01:30:03 +0200, Bent Stigsen wrote:
>Is the Oracle off limits? I mean, having/creating tables for the
temporary query result,

No, Oracle isn't off limits.
>which you subsequently select from. You'll
need to clean up at some point afterwards, but I reckon you need some
mechanism for that anyway.

Problem with paging in Oracle is this: if you want to page the output of
a query, you have to execute it over and over again and discard all except
the few rows. That's wasteful and slow.
Doesn't need to be like that. You could:

insert into cache_table select 'unique id' "_qid", rownum "_row",
....huge slow query...;

then then select on "_qid" and "_row" afterwards.

If they are indexed, Oracle should give what you need quite fast, and
shouldn't subsequently require much disc-io even if the result set is
humongous. It should be fast enough, I would think.
Trick to do that would be to
open a temporary file and map it to memory as an array. My question is: is
there a way to do mmap in PHP5? Thanks to anyone who might help me with an
answer.
Sorry can't help you there.

Not the same, but from the description of the apc extension, sounds
like you could use its apc-store and fetch.

--
/Bent
Jul 19 '06 #4

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

Similar topics

4
by: Lee Stewart | last post by:
I have a custom piece of code that I need to call from PHP5, so I'm going to write an extension that will handle things for me. This is becoming urgent - my original plan didn't work out and I'm...
0
by: israelekpo | last post by:
phpPaypalPro version 0.2.0 Released The second version of phpPaypalPro has been released. phpPaypalPro is an object-oriented framework developed in PHP5 to integrate easily with the Website...
3
by: cheesecaker | last post by:
For some reason, when PHP starts, it doesn't want to load some extensions that I KNOW are there. Here's the startup log: Parent: Received restart signal -- Restarting the server. Child 5176:...
5
by: Chuck Anderson | last post by:
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC (Windows XP). One of the scripts that I run daily needs to access a secure URL (https://..............). When I am running Php4,...
8
by: Unknown Soldier | last post by:
Hello, I have a couple queries about mmap() that ppl here might be able to help with. 1. What's the best way to resize an mmap()d area when you've enlarged the file? Can you call mmap() again...
6
by: msb_6 | last post by:
Currently I have a PHP extension thats all written and compiles under windows, but the PC I'm going to end up putting it on is running Ubuntu 8.04 (g++ 4.2.3). I've delved into PHP documentation...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: Akira Kitada | last post by:
Hi Marc-Andre, Thanks for the suggestion. I opened a ticket for this issue: http://bugs.python.org/issue4204 Now I understand the state of the multiprocessing module, but it's too bad to see...
0
by: M.-A. Lemburg | last post by:
On 2008-10-25 20:19, Akira Kitada wrote: Thanks. The errors you are getting appear to be related to either some missing header files or a missing symbol definition to enable these - looking...
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: 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
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
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
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...

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.